|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.serialization.avro.AvroGenericSerializer
public class AvroGenericSerializer
Avro serializer that uses the generic representation for Avro data. This representation is best for applications which deal with dynamic data, whose schemas are not known until runtime.
Constructor Summary | |
---|---|
AvroGenericSerializer(java.lang.String schema)
Constructor accepting the schema definition as a JSON string. |
Method Summary | |
---|---|
byte[] |
toBytes(java.lang.Object object)
Construct an array of bytes from the given object |
java.lang.Object |
toObject(byte[] bytes)
Create an object from an array of bytes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AvroGenericSerializer(java.lang.String schema)
schema
- a serialized JSON object representing a Avro schema.Method Detail |
---|
public byte[] toBytes(java.lang.Object object)
Serializer
toBytes
in interface Serializer<java.lang.Object>
object
- The object
public java.lang.Object toObject(byte[] bytes)
Serializer
toObject
in interface Serializer<java.lang.Object>
bytes
- An array of bytes with the objects data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |