public class PropertyListParser extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
PropertyListParser()
Objects are unneccesary.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
convertToASCII(File in,
File out)
Converts a given property list file into ASCII format.
|
static void |
convertToBinary(File in,
File out)
Converts a given property list file into the OS X and iOS binary format.
|
static void |
convertToGnuStepASCII(File in,
File out)
Converts a given property list file into ASCII format.
|
static void |
convertToXml(File in,
File out)
Converts a given property list file into the OS X and iOS XML format.
|
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(String filePath)
Parses a property list from a file.
|
protected static byte[] |
readAll(InputStream in,
int max)
Reads all bytes from an InputStream and stores them in an array, up to
a maximum count.
|
static void |
saveAsASCII(NSArray root,
File out)
Saves a property list with the given object as root into a ASCII file.
|
static void |
saveAsASCII(NSDictionary root,
File out)
Saves a property list with the given object as root into a ASCII file.
|
static void |
saveAsBinary(NSObject root,
File out)
Saves a property list with the given object as root into a binary file.
|
static void |
saveAsBinary(NSObject root,
OutputStream out)
Saves a property list with the given object as root in binary format into an output stream.
|
static void |
saveAsGnuStepASCII(NSArray root,
File out)
Saves a property list with the given object as root into a ASCII file.
|
static void |
saveAsGnuStepASCII(NSDictionary root,
File out)
Saves a property list with the given object as root into a ASCII file.
|
static void |
saveAsXML(NSObject root,
File out)
Saves a property list with the given object as root into a XML file.
|
static void |
saveAsXML(NSObject root,
OutputStream out)
Saves a property list with the given object as root in XML format into an output stream.
|
protected static byte[] readAll(InputStream in, int max) throws IOException
in - The InputStream pointing to the data that should be stored in the array.max - The maximum number of bytes to read.IOExceptionpublic static NSObject parse(String filePath) throws Exception
filePath - Path to the property list file.Exception - If an error occurred while parsing.public static NSObject parse(File f) throws Exception
f - The property list file.Exception - If an error occurred while parsing.public static NSObject parse(byte[] bytes) throws Exception
bytes - The property list data as a byte array.Exception - If an error occurred while parsing.public static NSObject parse(InputStream is) throws Exception
is - The InputStream delivering the property list data.Exception - If an error occurred while parsing.public static void saveAsXML(NSObject root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.public static void saveAsXML(NSObject root, OutputStream out) throws IOException
root - The root object.out - The output stream.IOException - When an error occurs during the writing process.public static void convertToXml(File in, File out) throws Exception
in - The source file.out - The target file.Exception - When an error occurs during parsing or converting.public static void saveAsBinary(NSObject root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.public static void saveAsBinary(NSObject root, OutputStream out) throws IOException
root - The root object.out - The output stream.IOException - When an error occurs during the writing process.public static void convertToBinary(File in, File out) throws Exception
in - The source file.out - The target file.Exception - When an error occurs during parsing or converting.public static void saveAsASCII(NSDictionary root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.public static void saveAsASCII(NSArray root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.public static void convertToASCII(File in, File out) throws Exception
in - The source file.out - The target file.Exception - When an error occurs during parsing or converting.public static void saveAsGnuStepASCII(NSDictionary root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.public static void saveAsGnuStepASCII(NSArray root, File out) throws IOException
root - The root object.out - The output file.IOException - When an error occurs during the writing process.Copyright © 2013. All Rights Reserved.