Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.instance.orient.internal
Class ExtendedWKBReader

java.lang.Object
  extended by eu.esdihumboldt.hale.common.instance.orient.internal.ExtendedWKBReader

public class ExtendedWKBReader
extends Object

Extended version of WKBReader, that differentiates between LinearRings and LineStrings.


Constructor Summary
ExtendedWKBReader()
          Default constructor
ExtendedWKBReader(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
          Create an extended WKB reader with the given geometry factory.
 
Method Summary
static byte[] hexToBytes(String hex)
          Converts a hexadecimal string to a byte array.
 com.vividsolutions.jts.geom.Geometry read(byte[] bytes)
          Reads a single Geometry in WKB format from a byte array.
 com.vividsolutions.jts.geom.Geometry read(com.vividsolutions.jts.io.InStream is)
          Reads a Geometry in binary WKB format from an InStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedWKBReader

public ExtendedWKBReader()
Default constructor


ExtendedWKBReader

public ExtendedWKBReader(com.vividsolutions.jts.geom.GeometryFactory geometryFactory)
Create an extended WKB reader with the given geometry factory.

Parameters:
geometryFactory - the geometry factory
Method Detail

hexToBytes

public static byte[] hexToBytes(String hex)
Converts a hexadecimal string to a byte array. The hexadecimal digit symbols are case-insensitive.

Parameters:
hex - a string containing hex digits
Returns:
an array of bytes with the value of the hex string

read

public com.vividsolutions.jts.geom.Geometry read(byte[] bytes)
                                          throws com.vividsolutions.jts.io.ParseException
Reads a single Geometry in WKB format from a byte array.

Parameters:
bytes - the byte array to read from
Returns:
the geometry read
Throws:
com.vividsolutions.jts.io.ParseException - if the WKB is ill-formed

read

public com.vividsolutions.jts.geom.Geometry read(com.vividsolutions.jts.io.InStream is)
                                          throws IOException,
                                                 com.vividsolutions.jts.io.ParseException
Reads a Geometry in binary WKB format from an InStream.

Parameters:
is - the stream to read from
Returns:
the Geometry read
Throws:
IOException - if the underlying stream creates an error
com.vividsolutions.jts.io.ParseException - if the WKB is ill-formed

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d