Class BinaryParser
- java.lang.Object
-
- io.github.sebasbaumh.postgis.binary.BinaryParser
-
public final class BinaryParser extends Object
A parser for reading geometries from a binary or hex string representation.- Author:
- Sebastian Baumhekel
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Geometry
parse(byte[] value, int offset)
Parse a hex encoded geometrystatic Geometry
parse(String value)
Parse a hex encoded geometry
-
-
-
Method Detail
-
parse
public static Geometry parse(byte[] value, int offset)
Parse a hex encoded geometry- Parameters:
value
- byte array containing the data to be parsedoffset
- offset- Returns:
- resulting geometry for the parsed data
- Throws:
IllegalArgumentException
- if a contained geometry is of the wrong type or the encoding type is unknown
-
parse
public static Geometry parse(String value)
Parse a hex encoded geometry- Parameters:
value
- String containing the data to be parsed- Returns:
- resulting geometry for the parsed data
- Throws:
IllegalArgumentException
- if a contained geometry is of the wrong type or the encoding type is unknown
-
-