Class WKBHexFileReader

Hierarchy: Object , WKBHexFileReader
public class WKBHexFileReader
Reads a sequence of Geometrys in WKBHex format from a text file. Each WKBHex geometry must be on a single line The geometries in the file may be separated by any amount of whitespace and newlines.
Authors:
Martin Davis
public WKBHexFileReader(File file, WKBReader wkbReader)
Creates a new WKBHexFileReader given the File to read from and a WKTReader to use to parse the geometries.
Parameters:
file - file the File to read from
wkbReader - wkbReader the geometry reader to use
public WKBHexFileReader(String filename, WKBReader wkbReader)
Creates a new WKBHexFileReader, given the name of the file to read from.
Parameters:
filename - filename the name of the file to read from
wkbReader - wkbReader the geometry reader to use
public WKBHexFileReader(Reader reader, WKBReader wkbReader)
Creates a new WKBHexFileReader, given a Reader to read from.
Parameters:
reader - reader the reader to read from
wkbReader - wkbReader the geometry reader to use
public void setLimit(int limit)
Sets the maximum number of geometries to read.
Parameters:
limit - limit the maximum number of geometries to read
public void setOffset(int offset)
Sets the number of geometries to skip before storing.
Parameters:
offset - offset the number of geometries to skip
public List read()
Reads a sequence of geometries. If an offset is specified, geometries read up to the offset count are skipped. If a limit is specified, no more than limit geometries are read.
Returns:
the list of geometries read
Throws:
IOException - IOException if an I/O exception was encountered
ParseException - ParseException if an error occurred reading a geometry