Package org.cugos.wkg

Class WKBReader

  • All Implemented Interfaces:
    Reader<byte[]>

    public class WKBReader
    extends Object
    implements Reader<byte[]>
    A WKB and EWKB Geometry Reader
    Author:
    Jared Erickson
    • Constructor Detail

      • WKBReader

        public WKBReader()
    • Method Detail

      • read

        public Geometry read​(byte[] bytes)
        Read a Geometry from an array of bytes.
        Specified by:
        read in interface Reader<byte[]>
        Parameters:
        bytes - The array of bytes
        Returns:
        A Geometry or null
      • getName

        public String getName()
        Description copied from interface: Reader
        Get the name of the Reader
        Specified by:
        getName in interface Reader<byte[]>
        Returns:
        The name
      • read

        public Geometry read​(String hex)
        Read a Geometry from a hex String
        Parameters:
        hex - The hex String
        Returns:
        A Geometry or null
      • read

        protected Geometry read​(ByteBuffer buffer)
        Read a Geometry from a ByteBuffer
        Parameters:
        buffer - The ByteBuffer
        Returns:
        A Geometry or null