Package org.evoludo.util
Class PlistReader
Object
PlistReader
Iterator over tags in
plist-string.- Author:
- Christoph Hauert
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleantrueif done reading theplist-string.(package private) booleantrueif no processing has occurred yet.(package private) StringRemainder ofplist-string.(package private) intNumber of lines read inplist-string.(package private) StringName of root tag as specified in DOCTYPE declaration(package private) PlistTagNext tag. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 donetrueif done reading theplist-string. -
tag
PlistTag tagNext tag. -
isVirgin
boolean isVirgintrueif 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- ifnullstring 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
-