Class PlistReader

Object
PlistReader
All Implemented Interfaces:
Iterator<PlistTag>

public class PlistReader extends Object implements Iterator<PlistTag>
Iterator over tags in plist-string.
Author:
Christoph Hauert
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) boolean
    true if done reading the plist-string.
    (package private) boolean
    true if no processing has occurred yet.
    (package private) String
    Remainder of plist-string.
    (package private) int
    Number of lines read in plist-string.
    (package private) String
    Name of root tag as specified in DOCTYPE declaration
    (package private) PlistTag
    Next tag.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create reader for plist-string.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return line number of last line read.
    boolean
     
     
    protected void
    Parse (and discard) header of plist-string.
    private void
    Utility method to skip comments in plist-string.

    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 read
      Number of lines read in plist-string.
    • line

      String line
      Remainder of plist-string.
    • root

      String root
      Name of root tag as specified in DOCTYPE declaration
    • done

      boolean done
      true if done reading the plist-string.
    • tag

      Next tag.
    • isVirgin

      boolean isVirgin
      true if no processing has occurred yet. In particular this means that the header has not yet been parsed.
      See Also:
  • Constructor Details

  • Method Details

    • parseHeader

      protected void parseHeader()
      Parse (and discard) header of plist-string. Performs only very rudimentary sanity checks.
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<PlistTag>
    • next

      public PlistTag next()
      Specified by:
      next in interface Iterator<PlistTag>
    • skipComments

      private void skipComments()
      Utility method to skip comments in plist-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