public final class AvroClassHierarchySerializer extends Object implements ClassHierarchySerializer
| Constructor and Description |
|---|
AvroClassHierarchySerializer() |
| Modifier and Type | Method and Description |
|---|---|
ClassHierarchy |
fromAvro(AvroNode n)
Deserialize the ClassHierarchy from the AvroNode.
|
ClassHierarchy |
fromByteArray(byte[] theBytes)
Deserializes a ClassHierarchy from a byte[] created with toByteArray().
|
ClassHierarchy |
fromFile(File file)
Loads a ClassHierarchy from a file created with toFile().
|
ClassHierarchy |
fromString(String theString)
Deserializes a ClassHierarchy from a String created with toString().
|
ClassHierarchy |
fromTextFile(File file)
Loads a ClassHierarchy from a text file created with toTextFile().
|
AvroNode |
toAvro(ClassHierarchy ch)
Serialize the ClassHierarchy into the AvroNode.
|
byte[] |
toByteArray(ClassHierarchy classHierarchy)
Serializes a ClassHierarchy as a byte[].
|
void |
toFile(ClassHierarchy classHierarchy,
File file)
Writes a ClassHierarchy into a file.
|
String |
toString(ClassHierarchy classHierarchy)
Serializes a ClassHierarchy as a String.
|
void |
toTextFile(ClassHierarchy classHierarchy,
File file)
Writes a ClassHierarchy into a text file.
|
@Inject public AvroClassHierarchySerializer()
public AvroNode toAvro(ClassHierarchy ch)
ch - ClassHierarchy to serializepublic ClassHierarchy fromAvro(AvroNode n)
n - AvroNode to deserializepublic void toFile(ClassHierarchy classHierarchy, File file) throws IOException
ClassHierarchySerializertoFile in interface ClassHierarchySerializerclassHierarchy - the ClassHierarchy to storefile - the file to store the ClassHierarchyIOException - if there is an error in the processpublic byte[] toByteArray(ClassHierarchy classHierarchy) throws IOException
ClassHierarchySerializertoByteArray in interface ClassHierarchySerializerclassHierarchy - the ClassHierarchy to storeIOException - if there is an error in the processpublic String toString(ClassHierarchy classHierarchy) throws IOException
ClassHierarchySerializertoString in interface ClassHierarchySerializerclassHierarchy - the ClassHierarchy to storeIOException - if there is an error in the processpublic void toTextFile(ClassHierarchy classHierarchy, File file) throws IOException
ClassHierarchySerializertoTextFile in interface ClassHierarchySerializerclassHierarchy - the ClassHierarchy to storefile - the text file to store the ClassHierarchyIOException - if there is an error in the processpublic ClassHierarchy fromFile(File file) throws IOException
ClassHierarchySerializerfromFile in interface ClassHierarchySerializerfile - the File to read fromIOException - if the File can't be read or parsedpublic ClassHierarchy fromByteArray(byte[] theBytes) throws IOException
ClassHierarchySerializerfromByteArray in interface ClassHierarchySerializertheBytes - the byte[] to deserializeIOException - if the byte[] can't be read or parsedpublic ClassHierarchy fromString(String theString) throws IOException
ClassHierarchySerializerfromString in interface ClassHierarchySerializertheString - the String to deserializeIOException - if the String can't be read or parsedpublic ClassHierarchy fromTextFile(File file) throws IOException
ClassHierarchySerializerfromTextFile in interface ClassHierarchySerializerfile - the File to read fromIOException - if the File can't be read or parsedCopyright © 2016 The Apache Software Foundation. All rights reserved.