The finalize() method of any object is called by the JVM during a GC cycle.
This gives the developer the chance to do any clean up before the
object is removed from object heap. A good example of cleanup might
be closing JDBC connection to a database or cleanly closing socket
connection,
Cheers
C
Hi,there:
Thanks for the comments on reading huge file using java .
Following some of your comments, right now I got a solution, which
tested for one 150M file just using 1 minutes and then draw the image.
That sounds a good result I can get.
Actually, I just used the bufferIO, and
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 j
One solution is read line by line process it write to a temporary file on
you hard drive . This way you need say a StringBuffer as big as a line long
500 should do it although it does not matter. Every time you start a new
line use setLength( 0 ); and start appending .
When you are done do what e
Quanyu,
It actually depends on what you want to do with the file. If you can read it bit
by bit and not have it in memory all the time, a BufferedInputStream on top of
an InputStream will probably help performance. If you need random access to the
file, use the RandomAccessFile class.
Otherwise,
Hi:
I just have one mission to read a huge file(more than 500M) using
java. Is there anyone having such kind of experiences on that?
My system is Java1.1.7a and running on Windows95/NT or Linux with
X-windows. And my runtime configuration is setting up 100M to 500M
memory size ,but my real