 If Johnny Java is speaking, you should probably listen.
|
|
How slow is writing to disk? |
|
|
|
Written by Johnny Java
|
|
Thursday, 05 October 2006 |
|
Even using a BufferedWriter, writing to disk is painfully slow. If you are updating a file and there is a good chance that the file hasn't changed, it's worth doing the following: - Build the new file in memory
- Read the old file from disk
- Compare the contents
- Write the new file if necessary
That's it folks, just a friendly performance note!
|
|
Last Updated ( Sunday, 08 October 2006 )
|
|
|
Sun JDK 1.4.2_12 InputStreamReader |
|
|
|
Written by Johnny Java
|
|
Wednesday, 04 October 2006 |
|
Found what looks like a problem in jdk 1.4.2_12: If you create a java.io.InputStreamReader with an encoding of "UnicodeLittle" (UTF-16LE) and try to read an UTF-16LE encoded file with no byte order mark you will not get the appropriate data. This problem does not exist in jdk 1.4.2_10 |
|
Last Updated ( Sunday, 08 October 2006 )
|
|
|