This §$%&/ Xerces closes the input stream i gave him for input. Why does it close a stream it hasn't opened? I stop parsing with an exception thrown in endElement.
This is really annoying if you parse the input of a socket which is closed both ways if the stream is closed. You will never be able to write back an answer. Solution is a wrapper for the input stream which overwrites the close method. Haug public class ProtectedInputStream extends InputStream { private InputStream is; public ProtectedInputStream(InputStream is) { this.is = is; } public int read() throws IOException { return is.read(); } public void close() { } }