Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1266378

(spec) PipedInputStream specification needs improvements

XMLWordPrintable

    • b89
    • sparc
    • solaris_2.5

      Name: saf@russia Date: 09/04/96


      This bug was found by St.Petersburg Java SQE team (by Stanislav Avzan).

      The Java Language specification (Version 1.0 - August 1, 1996) does not contain
      any information about buffer in java.io.PipedInputStream.

      Testing suites discovered that PipedInputStream/PipedOutputStream connected pair
      contains fixed size buffer (1024 bytes). The behaviour of methods of these
      classes in the buffer full condition is not specified.

      Here are our proposals on the Specification fix:

      1) Buffer limits should be somehow explicitly specified.
      2) It should be stated that java.io.PipedInputStream.read(b,off,len) cannot
         read more than <buffer size> by one call, and multiple reads have to be
         performed to get more data.
      3) It should be stated that java.io.PipedOutputStream.write(b) call is
         blocked on the "buffer full" condition until the bytes written out are read.
      4) The statement in java.io.PipedOutputStream.write(b) method description
         "If the byte cannot be written for any reason, an IOException is thrown."
         (p.22.15.1) should also be corrected to explicitly specify in what cases
         IOExceptions are thrown.

      Workaround:
      None
      ======================================================================

            jhangalsunw Jayalaxmi Hangal (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: