public class BinarySerializer extends Serializer
See data definition file docs/serializer-binary.md
for format
spec.
Constructor and Description |
---|
BinarySerializer()
Construct a serializer instance.
|
BinarySerializer(boolean readStrict)
Construct a serializer instance.
|
BinarySerializer(boolean readStrict,
boolean versioned)
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 input,
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
public BinarySerializer()
public BinarySerializer(boolean readStrict)
readStrict
- If the serializer should fail on bad reading.public BinarySerializer(boolean readStrict, boolean versioned)
readStrict
- If the serializer should fail on reading mismatched data.versioned
- If the serializer should use the versioned service call format.public boolean binaryProtocol()
binaryProtocol
in class Serializer
public String mimeType()
mimeType
in class Serializer
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 input, 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 SerializerException
deserialize
in class Serializer
SerializerException
Copyright © 2016. All rights reserved.