Mapping a big file into memory

Discussion in 'Java' started by Sanjay, Nov 7, 2006.

  1. Sanjay

    Sanjay Guest

    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..
     
    Sanjay, Nov 7, 2006
    #1
    1. Advertising

  2. Sanjay

    Simon Brooke Guest

    in message <>, Sanjay
    ('') wrote:

    > 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.

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/
    ,/| _.--''^``-...___.._.,;
    /, \'. _-' ,--,,,--'''
    { \ `_-'' ' /
    `;;' ; ; ;
    ._..--'' ._,,, _..' .;.'
    (,_....----''' (,..--''
     
    Simon Brooke, Nov 7, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    345
    Larry I Smith
    Jun 21, 2005
  2. Shaguf
    Replies:
    0
    Views:
    524
    Shaguf
    Dec 24, 2008
  3. Shaguf
    Replies:
    0
    Views:
    481
    Shaguf
    Dec 26, 2008
  4. Shaguf
    Replies:
    0
    Views:
    259
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    236
    Shaguf
    Dec 24, 2008
Loading...

Share This Page