public class FastBinarySerializer extends Serializer
See data definition file docs/fast-binary.md
for format spec.
Modifier and Type | Field and Description |
---|---|
static String |
MIME_TYPE |
protected boolean |
readStrict |
Constructor and Description |
---|
FastBinarySerializer()
Construct a serializer instance.
|
FastBinarySerializer(boolean readStrict)
Construct a serializer instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
binaryProtocol() |
<T extends PMessage<T>> |
deserialize(InputStream is,
PService service) |
<T extends PMessage<T>,TF extends PField> |
deserialize(InputStream is,
PStructDescriptor<T,TF> descriptor) |
String |
mimeType() |
<T extends PMessage<T>> |
serialize(OutputStream os,
PServiceCall<T> call) |
<T extends PMessage<T>> |
serialize(OutputStream os,
T message) |
cast
public static final String MIME_TYPE
protected final boolean readStrict
public FastBinarySerializer()
public FastBinarySerializer(boolean readStrict)
readStrict
- If serializer should fail on unknown input data.public <T extends PMessage<T>> int serialize(OutputStream os, T message) throws IOException, SerializerException
serialize
in class Serializer
IOException
SerializerException
public <T extends PMessage<T>> int serialize(OutputStream os, PServiceCall<T> call) throws IOException, SerializerException
serialize
in class Serializer
IOException
SerializerException
public <T extends PMessage<T>,TF extends PField> T deserialize(InputStream is, PStructDescriptor<T,TF> descriptor) throws SerializerException, IOException
deserialize
in class Serializer
SerializerException
IOException
public <T extends PMessage<T>> PServiceCall<T> deserialize(InputStream is, PService service) throws IOException, SerializerException
deserialize
in class Serializer
IOException
SerializerException
public boolean binaryProtocol()
binaryProtocol
in class Serializer
public String mimeType()
mimeType
in class Serializer
Copyright © 2016. All rights reserved.