public class KryoSerializer extends Object implements ByteArraySerializer, IOStreamSerializer
Modifier and Type | Field and Description |
---|---|
com.esotericsoftware.kryo.Kryo |
kryo |
Constructor and Description |
---|
KryoSerializer() |
Modifier and Type | Method and Description |
---|---|
com.esotericsoftware.kryo.Kryo |
getKryo() |
Object |
read(byte[] buf) |
<T> T |
read(byte[] buf,
Class<T> type) |
Object |
read(byte[] buf,
int offset) |
<T> T |
read(byte[] buf,
int offset,
Class<T> type) |
Object |
read(InputStream is) |
<T> T |
read(InputStream is,
Class<T> type) |
static void |
register(Class type) |
static void |
register(Class type,
int id) |
static void |
register(Class type,
com.esotericsoftware.kryo.Serializer ser) |
static void |
register(Class type,
com.esotericsoftware.kryo.Serializer ser,
int id) |
byte[] |
write(Object object) |
void |
write(OutputStream os,
Object object) |
public com.esotericsoftware.kryo.Kryo getKryo()
public static void register(Class type)
public static void register(Class type, int id)
public static void register(Class type, com.esotericsoftware.kryo.Serializer ser)
public static void register(Class type, com.esotericsoftware.kryo.Serializer ser, int id)
public byte[] write(Object object)
write
in interface ByteArraySerializer
public Object read(byte[] buf)
read
in interface ByteArraySerializer
public Object read(byte[] buf, int offset)
read
in interface ByteArraySerializer
public <T> T read(byte[] buf, Class<T> type)
public <T> T read(byte[] buf, int offset, Class<T> type)
public void write(OutputStream os, Object object)
write
in interface IOStreamSerializer
public Object read(InputStream is) throws IOException
read
in interface IOStreamSerializer
IOException
public <T> T read(InputStream is, Class<T> type)