public class PropertyListParser extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyListParser()
Prevent instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
convertToASCII(File in,
File out)
Deprecated.
Use
PropertyListConverter instead. |
static void |
convertToBinary(File in,
File out)
Deprecated.
Use
PropertyListConverter instead. |
static void |
convertToGnuStepASCII(File in,
File out)
Deprecated.
Use
PropertyListConverter instead. |
static void |
convertToXml(File in,
File out)
Deprecated.
Use
PropertyListConverter instead. |
static NSObject |
parse(byte[] bytes)
Parses a property list from a byte array.
|
static NSObject |
parse(File f)
Parses a property list from a file.
|
static NSObject |
parse(InputStream is)
Parses a property list from an InputStream.
|
static NSObject |
parse(Path path)
Parses a property list from a file.
|
static NSObject |
parse(String filePath)
Parses a property list from a file.
|
protected static byte[] |
readAll(InputStream in)
Reads all bytes from an InputStream and stores them in an array, up to
a maximum count.
|
static void |
saveAsASCII(NSArray root,
File out)
Deprecated.
Use
ASCIIPropertyListWriter instead. |
static void |
saveAsASCII(NSDictionary root,
File out)
Deprecated.
Use
ASCIIPropertyListWriter instead. |
static void |
saveAsBinary(NSObject root,
File out)
Deprecated.
Use
BinaryPropertyListWriter instead. |
static void |
saveAsBinary(NSObject root,
OutputStream out)
Deprecated.
Use
BinaryPropertyListWriter instead. |
static void |
saveAsGnuStepASCII(NSArray root,
File out)
Deprecated.
Use
ASCIIPropertyListWriter instead. |
static void |
saveAsGnuStepASCII(NSDictionary root,
File out)
Deprecated.
Use
ASCIIPropertyListWriter instead. |
static void |
saveAsXML(NSObject root,
File out)
Deprecated.
Use
XMLPropertyListWriter instead. |
static void |
saveAsXML(NSObject root,
OutputStream out)
Deprecated.
Use
XMLPropertyListWriter instead. |
protected static byte[] readAll(InputStream in) throws IOException
in - The InputStream pointing to the data that should be stored in the array.IOException - If an I/O error occurs while reading from the input stream.public static NSObject parse(String filePath) throws ParserConfigurationException, ParseException, SAXException, PropertyListFormatException, IOException
filePath - The path to the property list file.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If the given property list has an invalid format.public static NSObject parse(File f) throws IOException, PropertyListFormatException, ParseException, ParserConfigurationException, SAXException
f - The property list file.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If the given property list has an invalid format.public static NSObject parse(Path path) throws IOException, PropertyListFormatException, ParseException, ParserConfigurationException, SAXException
path - The path to the property list file.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If the given property list has an invalid format.public static NSObject parse(byte[] bytes) throws IOException, PropertyListFormatException, ParseException, ParserConfigurationException, SAXException
bytes - The property list data as a byte array.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the byte array.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If the given property list has an invalid format.public static NSObject parse(InputStream is) throws IOException, PropertyListFormatException, ParseException, ParserConfigurationException, SAXException
is - The InputStream delivering the property list data.NSDictionary but can also be a NSArray.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the input stream.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If the given property list has an invalid format.@Deprecated public static void saveAsXML(NSObject root, File out) throws IOException
XMLPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void saveAsXML(NSObject root, OutputStream out) throws IOException
XMLPropertyListWriter instead.root - The root object.out - The output stream.IOException - If an error occurs during the writing process.@Deprecated public static void convertToXml(File in, File out) throws ParserConfigurationException, ParseException, SAXException, PropertyListFormatException, IOException
PropertyListConverter instead.in - The source file.out - The target file. If the output file's parent directory does not exist, it will be created.ParserConfigurationException - If a document builder for parsing an XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the input file or writing the output file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.public static void saveAsBinary(NSObject root, File out) throws IOException
BinaryPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void saveAsBinary(NSObject root, OutputStream out) throws IOException
BinaryPropertyListWriter instead.root - The root object.out - The output stream.IOException - If an error occurs during the writing process.@Deprecated public static void convertToBinary(File in, File out) throws IOException, ParserConfigurationException, ParseException, SAXException, PropertyListFormatException
PropertyListConverter instead.in - The source file.out - The target file. If the output file's parent directory does not exist, it will be created.ParserConfigurationException - If a document builder for parsing a XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the input file or writing the output file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.@Deprecated public static void saveAsASCII(NSDictionary root, File out) throws IOException
ASCIIPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void saveAsASCII(NSArray root, File out) throws IOException
ASCIIPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void convertToASCII(File in, File out) throws ParserConfigurationException, ParseException, SAXException, PropertyListFormatException, IOException
PropertyListConverter instead.in - The source file.out - The target file. If the file's parent directory does not exist, it will be created.ParserConfigurationException - If a document builder for parsing a XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the input file or writing the output file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.@Deprecated public static void saveAsGnuStepASCII(NSDictionary root, File out) throws IOException
ASCIIPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void saveAsGnuStepASCII(NSArray root, File out) throws IOException
ASCIIPropertyListWriter instead.root - The root object.out - The output file. If the output file's parent directory does not exist, it will be created.IOException - If an error occurs during the writing process.@Deprecated public static void convertToGnuStepASCII(File in, File out) throws ParserConfigurationException, ParseException, SAXException, PropertyListFormatException, IOException
PropertyListConverter instead.in - The source file.out - The target file.ParserConfigurationException - If a document builder for parsing a XML property list
could not be created. This should not occur.IOException - If any I/O error occurs while reading the input file or writing the output file.SAXException - If any parse error occurs.PropertyListFormatException - If the given property list has an invalid format.ParseException - If a date string could not be parsed.Copyright © 2024. All rights reserved.