public abstract class PropertyListWriter
extends java.lang.Object
NSObjects to a property list.| Modifier and Type | Field and Description |
|---|---|
static PropertyListFormat |
DEFAULTFORMAT
The default format used when
write(NSObject, File) is called. |
| Constructor and Description |
|---|
PropertyListWriter(NSObject root)
Construct a new PropertyListWriter
|
| Modifier and Type | Method and Description |
|---|---|
static void |
write(NSObject root,
java.io.File file)
Convert a tree to a property list and write it to a stream
|
static void |
write(NSObject root,
java.io.File file,
PropertyListFormat format)
Convert a tree to a property list and write it to a file
|
static void |
write(NSObject root,
java.io.OutputStream stream,
PropertyListFormat format)
Convert a tree to a property list and write it to a stream
|
abstract void |
write(java.io.OutputStream stream)
Write the property list to a stream
|
public static PropertyListFormat DEFAULTFORMAT
write(NSObject, File) is called.
This usually is PropertyListFormat.BINARY on Mac OS X or PropertyListFormat.XML on other operating systems,
but might differ since this field is not final.
If you need a specific format you should not rely on the contents of this field to stay the same.
Instead you should specify the format as an argument in the write(NSObject, File, PropertyListFormat) method.
If you do not need a specific format then it is safe to use the write(OutputStream) method without PropertyListFormat argument.public PropertyListWriter(NSObject root)
root - the root of the treepublic abstract void write(java.io.OutputStream stream)
throws PropertyListException,
java.io.IOException
stream - the stream to write the property list toPropertyListException - when generating the property list failsjava.io.IOException - when writing to the stream failspublic static void write(NSObject root, java.io.OutputStream stream, PropertyListFormat format) throws PropertyListException, java.io.IOException
root - the root of the treestream - the stream to write the property list toformat - the format to use when writingPropertyListException - when generating the property list failsParserConfigurationException - when unable to create an XML documentjava.io.IOException - when writing to the stream failspublic static void write(NSObject root, java.io.File file) throws PropertyListException, java.io.IOException
PropertyListExceptionjava.io.IOExceptionwrite(NSObject, OutputStream, PropertyListFormat)public static void write(NSObject root, java.io.File file, PropertyListFormat format) throws PropertyListException, java.io.IOException
root - the root of the treefile - the file to write toformat - the format to use when writingPropertyListException - when generating the property list failsParserConfigurationException - when unable to create an XML documentjava.io.IOException - when writing to the stream fails