public abstract class PropertyListParser
extends java.lang.Object
NSObject
sModifier and Type | Field and Description |
---|---|
protected java.io.File |
file
The file being parsed
|
protected java.io.InputStream |
input
The
InputStream being parsed |
Modifier | Constructor and Description |
---|---|
protected |
PropertyListParser(java.io.File file,
java.io.InputStream input)
Construct a new PropertyListParser
|
|
PropertyListParser(java.io.InputStream input)
Construct a new PropertyListParser which will parse a InputStream
|
Modifier and Type | Method and Description |
---|---|
abstract NSObject |
parse()
Parse the Property List input (provided in the constructor) to a tree of
NSObject s |
static NSObject |
parse(java.io.File file)
Parse a Property List file.
|
static NSObject |
parse(java.io.InputStream input)
Parse a Property List InputStream.
|
protected final java.io.File file
protected final java.io.InputStream input
InputStream
being parsedpublic PropertyListParser(java.io.InputStream input)
input
- the InputStream to parseprotected PropertyListParser(java.io.File file, java.io.InputStream input)
file
- the file to parse or null
input
- the InputStream to parsepublic abstract NSObject parse() throws PropertyListException
NSObject
sNSObject
of the parsed Property ListPropertyListException
- when parsing the Property List failedpublic static NSObject parse(java.io.File file) throws PropertyListException, java.io.IOException
file
- the file to parseNSObject
of the parsed Property ListPropertyListException
- when parsing the file failedjava.io.IOException
- when reading the file failedpublic static NSObject parse(java.io.InputStream input) throws PropertyListException, java.io.IOException
Parse a Property List InputStream.
It is recommended to use an implementation where InputStream.markSupported()
returns true.
InputStream
s not meeting this recommendation will be wrapped inside a BufferedInputStream
, which does.
Mark is required to make it possible to try multiple parsing methods without consuming the InputStream
.
Warning: This method will not explicitly close the InputStream
.
You will have to close the stream yourself by calling InputStream.close()
after parse(InputStream)
.
input
- the InputStream to parse (instance with mark support recommended)NSObject
of the parsed property listPropertyListException
- when parsing the input failedjava.io.IOException
- when reading the input failed