java.lang.Object
org.hsqldb.lib.LineGroupReader
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 Summary
ConstructorsConstructorDescriptionLineGroupReader
(LineNumberReader reader) Default constructor for TestUtil usage.LineGroupReader
(LineNumberReader reader, String[] sectionStarts) Constructor for sections starting with specified strings. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static String
convertToString
(HsqlArrayList list, int offset) 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.static LineGroupReader
getGroupReader
(String path) static LineGroupReader
getGroupReader
(String path, String[] starters) int
static OrderedHashMap
getStatementMap
(String path)
-
Constructor Details
-
LineGroupReader
Default constructor for TestUtil usage. Sections start at lines beginning with any non-space character. SQL comment lines are ignored.- Parameters:
reader
- LineNumberReader
-
LineGroupReader
Constructor for sections starting with specified strings.- Parameters:
reader
- LineNumberReadersectionStarts
- String[]
-
-
Method Details
-
getNextSection
-
getSectionAsString
-
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
-
getStatementMap
-
getGroupReader
-
getGroupReader
-