public final class TextSerializerHelper
extends java.lang.Object
Constructor and Description |
---|
TextSerializerHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
bytesToHex(byte[] binary)
Convert binary array to a hex string.
|
static double |
consumeDouble(Text text,
char separator)
Deserializes and consumes a double from the given text.
|
static OGCGeometry |
consumeGeometryESRI(Text text,
char separator) |
static Geometry |
consumeGeometryJTS(Text text,
char separator) |
static long |
consumeHexLong(Text text,
char separator)
Deserializes and consumes a long from the given text.
|
static int |
consumeInt(Text text,
char separator) |
static long |
consumeLong(Text text,
char separator) |
static void |
consumeMap(Text text,
java.util.Map<java.lang.String,java.lang.String> tags) |
static long |
deserializeHexLong(byte[] buf,
int offset,
int len)
Parses only long from the given byte array (string).
|
static int |
deserializeInt(byte[] buf,
int offset,
int len) |
static long |
deserializeLong(byte[] buf,
int offset,
int len) |
static byte[] |
hexToBytes(java.lang.String hex)
Convert a string containing a hex string to a byte array of binary.
|
static OGCGeometry |
parseText(java.lang.String str) |
static void |
serializeDouble(double d,
Text t,
char toAppend)
Appends hex representation of the given number to the given string.
|
static void |
serializeGeometry(Text text,
Geometry geom,
char toAppend) |
static void |
serializeGeometry(Text text,
OGCGeometry geom,
char toAppend) |
static void |
serializeHexLong(long i,
Text t,
char toAppend)
Appends hex representation of the given number to the given string.
|
static void |
serializeInt(int i,
Text t,
char toAppend) |
static void |
serializeLong(long i,
Text t,
char toAppend) |
static Text |
serializeMap(Text text,
java.util.Map<java.lang.String,java.lang.String> tags) |
public static void serializeHexLong(long i, Text t, char toAppend)
i
- t
- appendComma
- public static long deserializeHexLong(byte[] buf, int offset, int len)
buf
- offset
- len
- public static long consumeHexLong(Text text, char separator)
text
- separator
- public static double consumeDouble(Text text, char separator)
text
- separator
- public static void serializeDouble(double d, Text t, char toAppend)
i
- t
- appendComma
- public static void serializeLong(long i, Text t, char toAppend)
public static long deserializeLong(byte[] buf, int offset, int len)
public static long consumeLong(Text text, char separator)
public static void serializeInt(int i, Text t, char toAppend)
public static int deserializeInt(byte[] buf, int offset, int len)
public static int consumeInt(Text text, char separator)
public static void consumeMap(Text text, java.util.Map<java.lang.String,java.lang.String> tags)
public static Text serializeMap(Text text, java.util.Map<java.lang.String,java.lang.String> tags)
public static OGCGeometry consumeGeometryESRI(Text text, char separator)
public static OGCGeometry parseText(java.lang.String str)
public static byte[] hexToBytes(java.lang.String hex)
hex
- public static void serializeGeometry(Text text, OGCGeometry geom, char toAppend)
public static void serializeGeometry(Text text, Geometry geom, char toAppend)
public static Geometry consumeGeometryJTS(Text text, char separator)
public static java.lang.String bytesToHex(byte[] binary)
binary
-