Class DB2WKBReader


  • public class DB2WKBReader
    extends Object
    Author:
    Christian Mueller

    Version of JTS WKB Reader adjusted for DB2

    See Also:
    for JTS Java Doc
    • Constructor Summary

      Constructors 
      Constructor Description
      DB2WKBReader()  
      DB2WKBReader​(GeometryFactory geometryFactory)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static byte[] hexToBytes​(String hex)
      Converts a hexadecimal string to a byte array.
      Geometry read​(byte[] bytes)
      Reads a single Geometry from a byte array.
      Geometry read​(InStream is)
      Reads a Geometry from an {@link InStream).
      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DB2WKBReader

        public DB2WKBReader()
      • DB2WKBReader

        public DB2WKBReader​(GeometryFactory geometryFactory)
    • Method Detail

      • hexToBytes

        public static byte[] hexToBytes​(String hex)
        Converts a hexadecimal string to a byte array.
        Parameters:
        hex - a string containing hex digits
      • read

        public Geometry read​(byte[] bytes)
                      throws 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 {@link InStream).
        Parameters:
        is - the stream to read from
        Returns:
        the Geometry read
        Throws:
        IOException
        ParseException