Skip to content

PropertyListParser.parse(InputStream) closes InputStream for TYPE_XML #55

@kaibolay

Description

@kaibolay

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:

  1. Update the documentation to point out that the InputStream might be closed.
  2. Update the implementation to wrap the InputStream to ignore close().

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions