com.vividsolutions.jts.io

Class WKBReader


public class WKBReader
extends java.lang.Object

Reads a Geometryfrom a byte stream in Well-Known Binary format. Supports use of an InStream, which allows easy use with arbitary byte stream sources.

This class is designed to support reuse of a single instance to read multiple geometries. This class is not thread-safe; each thread should create its own instance.

See Also:
WKBWriter

Constructor Summary

WKBReader()
WKBReader(GeometryFactory geometryFactory)

Method Summary

Geometry
read(byte[] bytes)
Reads a single Geometry from a byte array.
Geometry
read(InStream is)
Reads a Geometry from an

Constructor Details

WKBReader

public WKBReader()

WKBReader

public WKBReader(GeometryFactory geometryFactory)

Method Details

read

public Geometry read(byte[] bytes)
            throws IOException,
                   ParseException
Reads a single Geometry from a byte array.
Parameters:
bytes - the byte array to read from
Returns:
the geometry read
Throws:
ParseException - if a parse exception occurs

read

public Geometry read(InStream is)
            throws IOException,
                   ParseException
Reads a Geometry from an InStream). @param is the stream to read from @return the Geometry read @throws IOException @throws ParseException