Module org.hsqldb

Class LineGroupReader

java.lang.Object
org.hsqldb.lib.LineGroupReader

public class LineGroupReader extends Object
Uses a LineNumberReader and returns multiple consecutive lines which conform to the specified group demarcation characteristics. Any exception thrown while reading from the reader is handled internally.
Since:
1.9.0
Author:
Fred Toussi (fredt@users dot sourceforge.net)
  • Constructor Details

    • LineGroupReader

      public LineGroupReader(LineNumberReader reader)
      Default constructor for TestUtil usage. Sections start at lines beginning with any non-space character. SQL comment lines are ignored.
      Parameters:
      reader - LineNumberReader
    • LineGroupReader

      public LineGroupReader(LineNumberReader reader, String[] sectionStarts)
      Constructor for sections starting with specified strings.
      Parameters:
      reader - LineNumberReader
      sectionStarts - String[]
  • Method Details

    • getNextSection

      public HsqlArrayList getNextSection()
    • getSectionAsString

      public String getSectionAsString()
    • getAsMap

      public OrderedHashMap getAsMap()
      Returns a map/list which contains the first line of each line group as key and the rest of the lines as a String value.
      Returns:
      OrderedHashMap
    • getStartLineNumber

      public int getStartLineNumber()
    • close

      public void close()
    • convertToString

      public static String convertToString(HsqlArrayList list, int offset)
    • getStatementMap

      public static OrderedHashMap getStatementMap(String path)
    • getGroupReader

      public static LineGroupReader getGroupReader(String path, String[] starters)
    • getGroupReader

      public static LineGroupReader getGroupReader(String path)