The method PropertyListParser.parse(InputStream) is documented as
Parses a property list from an InputStream. This method does not close the specified input stream.
Unfortunately the underlying Xerxes XML parser does close the InputStream.
As a workaround I wrap the InputStream to ignore close():
PropertyListParser.parse(
new FilterInputStream(inputStream) {
@Override public void close() {}
});
I see two ways to fix this bug:
- Update the documentation to point out that the InputStream might be closed.
- Update the implementation to wrap the InputStream to ignore
close().
The method
PropertyListParser.parse(InputStream)is documented asUnfortunately the underlying Xerxes XML parser does close the InputStream.
As a workaround I wrap the InputStream to ignore
close():I see two ways to fix this bug:
close().