Quanyu,

I would say:

1. Again, use BufferedInputStream
2. Use your own buffer, i.e., a char[1024] or something equally large, and read
the file in chunks.

-Mario.

Quanyu Zhu wrote:

> Hi,there:
>    Thanks for the comments !
>    I think I need to specify more detail about my mission.
>    I just worked on file which contain the image info, I need to get the
> info from the huge file. The file format like:
>    Structure Table 1;
>    Structure Table 2;
>    pixel 1:
>    {
>     Loop 1:
>       data Structure 1
>       data Structure 2
>       ...
>     until data struture.member1 == 0;
>    }
>    pixel 2:
>    {
>     Loop 1:
>       data Structure 1
>       data Structure 2
>       ...
>     until data struture.member1 == 0;
>    }
>    ...
>    What I need is to get the info for the pixel to draw the image.
> Although the pixel is huge, but within each pixel, I need to add the
> data structure member2 to get the value of pixel.
>    At first, I just read the pixel by pixel, that is a very small file
> which just contain 11M. For this method, it seems worked very slow.
>    Then I used one byte array allocate the size of the file. Then used
> the byte array to convert it to int using shift.
>    It improved the performance a lot.
>    But the real data file I will deal with is more than 11M. It is more
> than 500M.
>    That is my problem.
>    So anyone have such idea ?
>
> Best Regard
> Quanyu Zhu
>
>
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com

Reply via email to