public class EdisonSerializationHelper extends Object
Constructor and Description |
---|
EdisonSerializationHelper() |
Modifier and Type | Method and Description |
---|---|
static TextAnnotation |
deserializeFromBytes(byte[] buf)
Read a text annotation from a byte array.
|
static TextAnnotation |
deserializeFromJson(String jsonString)
Read a text annotation from a json string.
|
static byte[] |
serializeToBytes(TextAnnotation ta)
Serialize a text annotation into a byte array.
|
static String |
serializeToJson(TextAnnotation ta)
Serialize a text annotation into a json string.
|
public static byte[] serializeToBytes(TextAnnotation ta) throws IOException
ta
- The text annotation to be serializedIOException
public static TextAnnotation deserializeFromBytes(byte[] buf) throws Exception
serializeToBytes(TextAnnotation)
functionbuf
- The byte arrayException
public static String serializeToJson(TextAnnotation ta)
ta
- The text annotation to be serializedIOException
public static TextAnnotation deserializeFromJson(String jsonString) throws Exception
serializeToJson(TextAnnotation)
functionjsonString
- The json string representation for the textException
Copyright © 2015. All rights reserved.