|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.io.SerDeUtils
public final class SerDeUtils
Static serialization/deserialization utility functions, intended to eventually replace ICompactSerializers.
Constructor Summary | |
---|---|
SerDeUtils()
|
Method Summary | ||
---|---|---|
static byte[] |
copy(java.nio.ByteBuffer buff)
|
|
static
|
createArray(int size,
org.apache.avro.Schema schema)
Create a generic array of the given type and size. |
|
static java.io.DataInputStream |
createDataInputStream(java.nio.ByteBuffer buff)
|
|
static
|
deserialize(org.apache.avro.Schema writer,
java.nio.ByteBuffer bytes,
T ob)
Deserializes a single object based on the given Schema. |
|
static
|
deserializeWithSchema(java.nio.ByteBuffer bytes,
T ob)
Deserializes a single object as stored along with its Schema by serialize(T). |
|
static
|
serialize(T o)
Serializes a single object. |
|
static
|
serializeWithSchema(T o)
Serializes a single object along with its Schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SerDeUtils()
Method Detail |
---|
public static byte[] copy(java.nio.ByteBuffer buff)
public static <T extends org.apache.avro.specific.SpecificRecord> T deserialize(org.apache.avro.Schema writer, java.nio.ByteBuffer bytes, T ob) throws java.io.IOException
writer
- writer's schemabytes
- Array to deserialize fromob
- An empty object to deserialize into (must not be null).
java.io.IOException
public static <T extends org.apache.avro.specific.SpecificRecord> java.nio.ByteBuffer serialize(T o) throws java.io.IOException
o
- Object to serialize
java.io.IOException
public static <T extends org.apache.avro.specific.SpecificRecord> T deserializeWithSchema(java.nio.ByteBuffer bytes, T ob) throws java.io.IOException
ob
- An empty object to deserialize into (must not be null).bytes
- Array to deserialize from
java.io.IOException
public static <T extends org.apache.avro.specific.SpecificRecord> java.nio.ByteBuffer serializeWithSchema(T o) throws java.io.IOException
o
- Object to serialize
java.io.IOException
public static java.io.DataInputStream createDataInputStream(java.nio.ByteBuffer buff)
public static <T> org.apache.avro.generic.GenericArray<T> createArray(int size, org.apache.avro.Schema schema)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |