Package com.tagtraum.core
Class PList<R>
- java.lang.Object
-
- com.tagtraum.core.PList<R>
-
public class PList<R> extends Object
Implementation of an Apple plist reader.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PList.ValidUTF8FilterInputStream
Silently drops invalid UTF-8 sequences from the inputstream.
-
Field Summary
Fields Modifier and Type Field Description static String
APPLE_COMPUTER_DTD_PLIST_1_0_EN
-
Constructor Summary
Constructors Constructor Description PList(InputStream inputStream)
PList(Path file)
PList(Path file, ProgressListener progressListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addArrayItem(Stack stack, List<Object> list, Object item)
Adds item to the current list.protected void
addDictEntry(Stack stack, Map<String,Object> dict, String key, Object value)
Adds an entry to a dictionary.R
getRoot()
Object
parse()
-
-
-
Field Detail
-
APPLE_COMPUTER_DTD_PLIST_1_0_EN
public static final String APPLE_COMPUTER_DTD_PLIST_1_0_EN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PList
public PList(Path file) throws IOException
- Parameters:
file
- file to read- Throws:
IOException
- in case of an IOException
-
PList
public PList(Path file, ProgressListener progressListener) throws IOException
- Parameters:
file
- fileprogressListener
- progress listener- Throws:
IOException
- in case an IOException occurs
-
PList
public PList(InputStream inputStream) throws IOException
- Parameters:
inputStream
- input stream- Throws:
IOException
- in case an IOException occurs
-
-
Method Detail
-
parse
public Object parse() throws IOException, ParserConfigurationException, SAXException
-
getRoot
public R getRoot()
-
addArrayItem
protected void addArrayItem(Stack stack, List<Object> list, Object item)
Adds item to the current list.- Parameters:
stack
- current stacklist
- array to add the item toitem
- item to add
-
-