Mapping a big file into memory

S

Sanjay

There is a big file and instead of loading this whole file i want to
map a part of the file onto memory.And want to perform searching on the
mapped
part if the required data is not available unload that Memory part.And
go for the mapping of rest part of the file..ie i want to implement
similar to demand paging using java.
Plz help me out..
 
S

Simon Brooke

Sanjay said:
There is a big file and instead of loading this whole file i want to
map a part of the file onto memory.And want to perform searching on the
mapped
part if the required data is not available unload that Memory part.And
go for the mapping of rest part of the file..ie i want to implement
similar to demand paging using java.
Plz help me out..

What's wrong with reading a line (or a block of lines) at a time with a
BufferedReader, or reading a char array of a size you specify with an
InputStreamReader?

Either does exactly what you ask.

--
(e-mail address removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/
,/| _.--''^``-...___.._.,;
/, \'. _-' ,--,,,--'''
{ \ `_-'' ' /
`;;' ; ; ;
._..--'' ._,,, _..' .;.'
(,_....----''' (,..--''
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top