@@ -133,6 +133,8 @@ private static int determineType(InputStream is) throws IOException {
133133 * a maximum count.
134134 *
135135 * @param in The InputStream pointing to the data that should be stored in the array.
136+ * @return An array containing all bytes that were read from the input stream.
137+ * @throws java.io.IOException When an IO error while reading from the input stream.
136138 */
137139 protected static byte [] readAll (InputStream in ) throws IOException {
138140 ByteArrayOutputStream outputStream = new ByteArrayOutputStream ();
@@ -151,6 +153,12 @@ protected static byte[] readAll(InputStream in) throws IOException {
151153 *
152154 * @param filePath Path to the property list file.
153155 * @return The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
156+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
157+ * could not be created. This should not occur.
158+ * @throws java.io.IOException If any IO error occurs while reading the file.
159+ * @throws org.xml.sax.SAXException If any parse error occurs.
160+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
161+ * @throws java.text.ParseException If a date string could not be parsed.
154162 */
155163 public static NSObject parse (String filePath ) throws ParserConfigurationException , ParseException , SAXException , PropertyListFormatException , IOException {
156164 return parse (new File (filePath ));
@@ -161,6 +169,12 @@ public static NSObject parse(String filePath) throws ParserConfigurationExceptio
161169 *
162170 * @param f The property list file.
163171 * @return The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
172+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
173+ * could not be created. This should not occur.
174+ * @throws java.io.IOException If any IO error occurs while reading the file.
175+ * @throws org.xml.sax.SAXException If any parse error occurs.
176+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
177+ * @throws java.text.ParseException If a date string could not be parsed.
164178 */
165179 public static NSObject parse (File f ) throws IOException , PropertyListFormatException , ParseException , ParserConfigurationException , SAXException {
166180 FileInputStream fis = new FileInputStream (f );
@@ -183,6 +197,12 @@ public static NSObject parse(File f) throws IOException, PropertyListFormatExcep
183197 *
184198 * @param bytes The property list data as a byte array.
185199 * @return The root object in the property list. This is usually a NSDictionary but can also be a NSArray.
200+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
201+ * could not be created. This should not occur.
202+ * @throws java.io.IOException If any IO error occurs while reading the byte array.
203+ * @throws org.xml.sax.SAXException If any parse error occurs.
204+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
205+ * @throws java.text.ParseException If a date string could not be parsed.
186206 */
187207 public static NSObject parse (byte [] bytes ) throws IOException , PropertyListFormatException , ParseException , ParserConfigurationException , SAXException {
188208 switch (determineType (bytes )) {
@@ -202,6 +222,12 @@ public static NSObject parse(byte[] bytes) throws IOException, PropertyListForma
202222 *
203223 * @param is The InputStream delivering the property list data.
204224 * @return The root object of the property list. This is usually a NSDictionary but can also be a NSArray.
225+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
226+ * could not be created. This should not occur.
227+ * @throws java.io.IOException If any IO error occurs while reading the input stream.
228+ * @throws org.xml.sax.SAXException If any parse error occurs.
229+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
230+ * @throws java.text.ParseException If a date string could not be parsed.
205231 */
206232 public static NSObject parse (InputStream is ) throws IOException , PropertyListFormatException , ParseException , ParserConfigurationException , SAXException {
207233 return parse (readAll (is ));
@@ -242,6 +268,13 @@ public static void saveAsXML(NSObject root, OutputStream out) throws IOException
242268 *
243269 * @param in The source file.
244270 * @param out The target file.
271+ *
272+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
273+ * could not be created. This should not occur.
274+ * @throws java.io.IOException If any IO error occurs while reading the input file or writing the output file.
275+ * @throws org.xml.sax.SAXException If any parse error occurs.
276+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
277+ * @throws java.text.ParseException If a date string could not be parsed.
245278 */
246279 public static void convertToXml (File in , File out ) throws ParserConfigurationException , ParseException , SAXException , PropertyListFormatException , IOException {
247280 NSObject root = parse (in );
@@ -279,6 +312,12 @@ public static void saveAsBinary(NSObject root, OutputStream out) throws IOExcept
279312 *
280313 * @param in The source file.
281314 * @param out The target file.
315+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
316+ * could not be created. This should not occur.
317+ * @throws java.io.IOException If any IO error occurs while reading the input file or writing the output file.
318+ * @throws org.xml.sax.SAXException If any parse error occurs.
319+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
320+ * @throws java.text.ParseException If a date string could not be parsed.
282321 */
283322 public static void convertToBinary (File in , File out ) throws IOException , ParserConfigurationException , ParseException , SAXException , PropertyListFormatException {
284323 NSObject root = parse (in );
@@ -320,6 +359,12 @@ public static void saveAsASCII(NSArray root, File out) throws IOException {
320359 *
321360 * @param in The source file.
322361 * @param out The target file.
362+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
363+ * could not be created. This should not occur.
364+ * @throws java.io.IOException If any IO error occurs while reading the input file or writing the output file.
365+ * @throws org.xml.sax.SAXException If any parse error occurs.
366+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
367+ * @throws java.text.ParseException If a date string could not be parsed.
323368 */
324369 public static void convertToASCII (File in , File out ) throws ParserConfigurationException , ParseException , SAXException , PropertyListFormatException , IOException {
325370 NSObject root = parse (in );
@@ -374,6 +419,12 @@ public static void saveAsGnuStepASCII(NSArray root, File out) throws IOException
374419 *
375420 * @param in The source file.
376421 * @param out The target file.
422+ * @throws javax.xml.parsers.ParserConfigurationException If a document builder for parsing a XML property list
423+ * could not be created. This should not occur.
424+ * @throws java.io.IOException If any IO error occurs while reading the input file or writing the output file.
425+ * @throws org.xml.sax.SAXException If any parse error occurs.
426+ * @throws com.dd.plist.PropertyListFormatException If the given property list has an invalid format.
427+ * @throws java.text.ParseException If a date string could not be parsed.
377428 */
378429 public static void convertToGnuStepASCII (File in , File out ) throws ParserConfigurationException , ParseException , SAXException , PropertyListFormatException , IOException {
379430 NSObject root = parse (in );
0 commit comments