Name: vi73552 Date: 06/22/99
In jdk1.1 and jdk1.2 the read(byte[]) of the InputStream class
is implemented as a simple for-loop reading byte by byte from the inputstream. This applies to OutputStream in the write(byte[]) method. This implementation is causing a major degradation in the IO performance. The speed degradation can be reduced by using BufferedInputStream but the IO utilisation is still noticeably high. The performance problem is very noticeable when a large file/packet is being read. Another point is that, why can't the method be implemented using native calls. The FileInputStream does implement native read and write buffer. Why is there a inconsistency in the implementation of InputStreams? I believe that by using native calls , the Java IO will be substantially improved (if implemented properly).
(Review ID: 84631)
======================================================================