Package org.evoludo.util
Class PlistReader
Object
PlistReader
Iterator over tags in
plist
-string.- Author:
- Christoph Hauert
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) boolean
true
if done reading theplist
-string.(package private) boolean
true
if no processing has occurred yet.(package private) String
Remainder ofplist
-string.(package private) int
Number of lines read inplist
-string.(package private) String
Name of root tag as specified in DOCTYPE declaration(package private) PlistTag
Next tag. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface Iterator
forEachRemaining, remove
-
Field Details
-
read
int readNumber of lines read inplist
-string. -
line
String lineRemainder ofplist
-string. -
root
String rootName of root tag as specified in DOCTYPE declaration -
done
boolean donetrue
if done reading theplist
-string. -
tag
PlistTag tagNext tag. -
isVirgin
boolean isVirgintrue
if no processing has occurred yet. In particular this means that the header has not yet been parsed.- See Also:
-
-
Constructor Details
-
PlistReader
Create reader forplist
-string.- Parameters:
string
- inputplist
-string- Throws:
NullPointerException
- ifnull
string provided
-
-
Method Details
-
parseHeader
protected void parseHeader()Parse (and discard) header ofplist
-string. Performs only very rudimentary sanity checks. -
hasNext
public boolean hasNext() -
next
-
skipComments
private void skipComments()Utility method to skip comments inplist
-string. -
getLine
public int getLine()Return line number of last line read. This is mainly useful to provide some context in case an error or inconsistency is encountered.- Returns:
- last line read
-