(nio) InputStream should have native read method for bytearray

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: core-libs
    • generic
    • generic



      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)
      ======================================================================

            Assignee:
            Michael Mccloskey (Inactive)
            Reporter:
            Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: