Package com.dd.plist

Class XMLPropertyListWriter


  • public class XMLPropertyListWriter
    extends java.lang.Object
    Writes property lists in the XML format.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void write​(NSObject root, java.io.File out)
      Saves a property list with the given object as root into an XML file.
      static void write​(NSObject root, java.io.OutputStream out)
      Saves a property list with the given object as root in XML format into an output stream.
      static void write​(NSObject root, java.nio.file.Path path)
      Saves a property list with the given object as root into an XML file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XMLPropertyListWriter

        public XMLPropertyListWriter()
    • Method Detail

      • write

        public static void write​(NSObject root,
                                 java.io.File out)
                          throws java.io.IOException
        Saves a property list with the given object as root into an XML file.
        Parameters:
        root - The root object.
        out - The output file. If the output file's parent directory does not exist, it will be created.
        Throws:
        java.io.IOException - If an error occurs during the writing process.
      • write

        public static void write​(NSObject root,
                                 java.nio.file.Path path)
                          throws java.io.IOException
        Saves a property list with the given object as root into an XML file.
        Parameters:
        root - The root object.
        path - The output file path.
        Throws:
        java.io.IOException - If an error occurs during the writing process.
      • write

        public static void write​(NSObject root,
                                 java.io.OutputStream out)
                          throws java.io.IOException
        Saves a property list with the given object as root in XML format into an output stream. This method does not close the specified output stream.
        Parameters:
        root - The root object.
        out - The output stream.
        Throws:
        java.io.IOException - If an error occurs during the writing process.