|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.postgis.java2d.ShapeBinaryParser
public class ShapeBinaryParser
Parse binary representation of geometries. Currently, only text rep (hexed) implementation is tested. It should be easy to add char[] and CharSequence ByteGetter instances, although the latter one is not compatible with older jdks. I did not implement real unsigned 32-bit integers or emulate them with long, as both java Arrays and Strings currently can have only 2^31-1 elements (bytes), so we cannot even get or build Geometries with more than approx. 2^28 coordinates (8 bytes each).
| Constructor Summary | |
|---|---|
ShapeBinaryParser()
|
|
| Method Summary | |
|---|---|
int |
parse(byte[] value,
java.awt.geom.GeneralPath path)
Parse a binary encoded geometry. |
int |
parse(java.lang.String value,
java.awt.geom.GeneralPath path)
Parse a hex encoded geometry Is synchronized to protect offset counter. |
protected int |
parseGeometry(ValueGetter data,
java.awt.geom.GeneralPath path)
Parse a geometry starting at offset. |
static ValueGetter |
valueGetterForEndian(ByteGetter bytes)
Get the appropriate ValueGetter for my endianness |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ShapeBinaryParser()
| Method Detail |
|---|
public static ValueGetter valueGetterForEndian(ByteGetter bytes)
bytes - The appropriate Byte Getter
public int parse(java.lang.String value,
java.awt.geom.GeneralPath path)
public int parse(byte[] value,
java.awt.geom.GeneralPath path)
protected int parseGeometry(ValueGetter data,
java.awt.geom.GeneralPath path)
path -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||