public final class JDKSerializer extends Object implements ByteArraySerializer, IOStreamSerializer
Constructor and Description |
---|
JDKSerializer() |
Modifier and Type | Method and Description |
---|---|
Object |
read(byte[] buf) |
Object |
read(byte[] buf,
int offset) |
Object |
read(InputStream is) |
void |
registerWriteReplace(Class<?> clazz,
WriteReplace wr) |
static DataInput |
toDataInput(InputStream is) |
static DataOutput |
toDataOutput(OutputStream os) |
static ObjectInput |
toObjectInput(InputStream is) |
static ObjectOutput |
toObjectOutput(OutputStream os) |
byte[] |
write(Object object) |
void |
write(OutputStream os,
Object object) |
public void registerWriteReplace(Class<?> clazz, WriteReplace wr)
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 void write(OutputStream os, Object object) throws IOException
write
in interface IOStreamSerializer
IOException
public Object read(InputStream is) throws IOException
read
in interface IOStreamSerializer
IOException
public static DataOutput toDataOutput(OutputStream os)
public static ObjectOutput toObjectOutput(OutputStream os) throws IOException
IOException
public static DataInput toDataInput(InputStream is)
public static ObjectInput toObjectInput(InputStream is) throws IOException
IOException