public abstract class PSerializer extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
DEFAULT_ENTRY_SEP |
static byte[] |
DEFAULT_STREAM_INITIATOR |
static byte[] |
DEFAULT_STREAM_TERMINATOR |
| Constructor and Description |
|---|
PSerializer() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
cast(Object o) |
abstract <T> T |
deserialize(InputStream input,
PDescriptor<T> descriptor) |
byte[] |
entrySeparator() |
abstract <T> int |
serialize(OutputStream output,
PDescriptor<T> descriptor,
T value) |
abstract int |
serialize(OutputStream output,
PMessage<?> message) |
byte[] |
streamInitiator() |
boolean |
streamInitiatorPartOfData() |
byte[] |
streamTerminator() |
public static final byte[] DEFAULT_STREAM_INITIATOR
public static final byte[] DEFAULT_STREAM_TERMINATOR
public static final byte[] DEFAULT_ENTRY_SEP
public abstract int serialize(OutputStream output, PMessage<?> message) throws IOException, PSerializeException
IOExceptionPSerializeExceptionpublic abstract <T> int serialize(OutputStream output, PDescriptor<T> descriptor, T value) throws IOException, PSerializeException
IOExceptionPSerializeExceptionpublic abstract <T> T deserialize(InputStream input, PDescriptor<T> descriptor) throws IOException, PSerializeException
IOExceptionPSerializeExceptionpublic boolean streamInitiatorPartOfData()
public byte[] streamInitiator()
public byte[] streamTerminator()
public byte[] entrySeparator()
protected <T> T cast(Object o)
Copyright © 2016. All rights reserved.