JDK-4291371 - Java Issue Tracker
Nov 14, 1999 ... ... input stream reader, simply putting a high-order ... It can only block indefinitely, return -1 for end of stream, or throw an exception.
Nov 14, 1999 ... ... input stream reader, simply putting a high-order ... It can only block indefinitely, return -1 for end of stream, or throw an exception.
JDK-6354964 - XMLReader implementation (Parser2) Should Not Close InputStream.CUSTOMER SUBMITTED WORKAROUND : Wrap input stream into custom classes to control time of calling the method close() and to catch its exceptions.
java -cp test.jar Test sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream@1690726 -54 -2 -70 -66 0 0 0 50 minor 0 major 50 If a println is added, System.out.println(is.read(header)); instead of.
This is cut down from a larger piece of software which uses the Java Activation Framework (hence the use of InputStreams). I have attached the code, and two trivial HTML documents. Untitled.html was created with Netscape Communicator 4.5.
The stream is already consumed when the second getInputStream() is executed. So I'm forced to write the stream to a temporary file (because it may not fit in a memory resident ByteArrayInputStream), and return a new InputStream object each time.
Component: core-libs. Sub-Component: java.io. Affected Version: 7.A DESCRIPTION OF THE PROBLEM : When reading/writing from PipedInputStream/PipedOutputStream pair, read() blocks exactly for one second when new data is written into PipedOutputStream.