Package com.dd.plist

Class PropertyListConverter


  • public final class PropertyListConverter
    extends java.lang.Object
    Converts files between different property list formats.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PropertyListConverter()
      Prevents instantiation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void convertToASCII​(java.io.File in, java.io.File out)
      Converts a given property list file into ASCII format.
      static void convertToASCII​(java.nio.file.Path in, java.nio.file.Path out)
      Converts a given property list file into ASCII format.
      static void convertToBinary​(java.io.File in, java.io.File out)
      Converts a given property list file into the OS X and iOS binary format.
      static void convertToBinary​(java.nio.file.Path in, java.nio.file.Path out)
      Converts a given property list file into the OS X and iOS binary format.
      static void convertToGnuStepASCII​(java.io.File in, java.io.File out)
      Converts a given property list file into ASCII format.
      static void convertToXml​(java.io.File in, java.io.File out)
      Converts a given property list file into the OS X and iOS XML format.
      static void convertToXml​(java.nio.file.Path in, java.nio.file.Path out)
      Converts a given property list file into the OS X and iOS XML format.
      • Methods inherited from class java.lang.Object

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

      • PropertyListConverter

        private PropertyListConverter()
        Prevents instantiation.
    • Method Detail

      • convertToASCII

        public static void convertToASCII​(java.io.File in,
                                          java.io.File out)
                                   throws javax.xml.parsers.ParserConfigurationException,
                                          java.text.ParseException,
                                          org.xml.sax.SAXException,
                                          PropertyListFormatException,
                                          java.io.IOException
        Converts a given property list file into ASCII format.
        Parameters:
        in - The source file.
        out - The target file. If the file's parent directory does not exist, it will be created.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToASCII

        public static void convertToASCII​(java.nio.file.Path in,
                                          java.nio.file.Path out)
                                   throws javax.xml.parsers.ParserConfigurationException,
                                          java.text.ParseException,
                                          org.xml.sax.SAXException,
                                          PropertyListFormatException,
                                          java.io.IOException
        Converts a given property list file into ASCII format.
        Parameters:
        in - The source file path.
        out - The target file path.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToGnuStepASCII

        public static void convertToGnuStepASCII​(java.io.File in,
                                                 java.io.File out)
                                          throws javax.xml.parsers.ParserConfigurationException,
                                                 java.text.ParseException,
                                                 org.xml.sax.SAXException,
                                                 PropertyListFormatException,
                                                 java.io.IOException
        Converts a given property list file into ASCII format.
        Parameters:
        in - The source file.
        out - The target file. If the file's parent directory does not exist, it will be created.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToBinary

        public static void convertToBinary​(java.io.File in,
                                           java.io.File out)
                                    throws java.io.IOException,
                                           javax.xml.parsers.ParserConfigurationException,
                                           java.text.ParseException,
                                           org.xml.sax.SAXException,
                                           PropertyListFormatException
        Converts a given property list file into the OS X and iOS binary format.
        Parameters:
        in - The source file.
        out - The target file. If the file's parent directory does not exist, it will be created.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToBinary

        public static void convertToBinary​(java.nio.file.Path in,
                                           java.nio.file.Path out)
                                    throws java.io.IOException,
                                           javax.xml.parsers.ParserConfigurationException,
                                           java.text.ParseException,
                                           org.xml.sax.SAXException,
                                           PropertyListFormatException
        Converts a given property list file into the OS X and iOS binary format.
        Parameters:
        in - The source file path.
        out - The target file path.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToXml

        public static void convertToXml​(java.io.File in,
                                        java.io.File out)
                                 throws javax.xml.parsers.ParserConfigurationException,
                                        java.text.ParseException,
                                        org.xml.sax.SAXException,
                                        PropertyListFormatException,
                                        java.io.IOException
        Converts a given property list file into the OS X and iOS XML format.
        Parameters:
        in - The source file.
        out - The target file. If the file's parent directory does not exist, it will be created.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.
      • convertToXml

        public static void convertToXml​(java.nio.file.Path in,
                                        java.nio.file.Path out)
                                 throws javax.xml.parsers.ParserConfigurationException,
                                        java.text.ParseException,
                                        org.xml.sax.SAXException,
                                        PropertyListFormatException,
                                        java.io.IOException
        Converts a given property list file into the OS X and iOS XML format.
        Parameters:
        in - The source file path.
        out - The target file path.
        Throws:
        javax.xml.parsers.ParserConfigurationException - If a document builder for parsing an XML property list could not be created. This should not occur.
        java.io.IOException - If any I/O error occurs while reading the input file or writing the output file.
        org.xml.sax.SAXException - If any parse error occurs.
        PropertyListFormatException - If the given property list has an invalid format.
        java.text.ParseException - If a date string could not be parsed.