public class UrlEncodedSerializer extends Serializer
| Modifier and Type | Field and Description |
|---|---|
static String |
MEDIA_TYPE |
static String |
MEDIA_TYPE_MULTIPART |
DEFAULT_STRICT| Constructor and Description |
|---|
UrlEncodedSerializer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
binaryProtocol() |
<Message extends PMessage<Message>> |
deserialize(InputStream input,
PMessageDescriptor<Message> descriptor)
Deserialize a message.
|
<Message extends PMessage<Message>> |
deserialize(InputStream input,
PService service)
Deserialize a service call.
|
String |
mediaType() |
<Message extends PMessage<Message>> |
serialize(OutputStream output,
PMessageOrBuilder<Message> message)
Serialize a message.
|
<Message extends PMessage<Message>> |
serialize(OutputStream output,
PServiceCall<Message> call)
Serialize a service call.
|
<Message extends PMessage<Message>> |
serialize(PMessageOrBuilder<Message> message) |
void |
verifyEndOfContent(InputStream input)
Verify that the input stream does not contain any more readable content and
close the stream.
|
isRequestCallType, toStringpublic static final String MEDIA_TYPE
public static final String MEDIA_TYPE_MULTIPART
public <Message extends PMessage<Message>> int serialize(@Nonnull OutputStream output, @Nonnull PMessageOrBuilder<Message> message) throws IOException
Serializerserialize in class SerializerMessage - The message type.output - The output stream to write to.message - The message to write.IOException - If writing or serialization failed.public <Message extends PMessage<Message>> int serialize(@Nonnull OutputStream output, @Nonnull PServiceCall<Message> call) throws IOException
Serializerserialize in class SerializerMessage - The message type contained in the service call.output - The output stream to write to.call - The service call to write.IOException - If writing or serialization failed.public <Message extends PMessage<Message>> String serialize(@Nonnull PMessageOrBuilder<Message> message) throws IOException
IOException@Nonnull public <Message extends PMessage<Message>> Message deserialize(@Nonnull InputStream input, @Nonnull PMessageDescriptor<Message> descriptor) throws IOException
Serializerdeserialize in class SerializerMessage - The message type.input - The input stream to read from.descriptor - The descriptor of the message to read.IOException - If reading or deserialization failed.@Nonnull public <Message extends PMessage<Message>> PServiceCall<Message> deserialize(@Nonnull InputStream input, @Nonnull PService service) throws IOException
Serializerdeserialize in class SerializerMessage - The message type contained in the returned service call.input - The input stream to read from.service - The service definition to read for.IOException - If reading or deserialization failed.public boolean binaryProtocol()
binaryProtocol in class Serializerpublic void verifyEndOfContent(@Nonnull InputStream input) throws IOException
SerializerverifyEndOfContent in class Serializerinput - The input stream to check.IOException - If unable to read from stream or stream contains meaningful content.@Nonnull public String mediaType()
mediaType in class SerializerCopyright © 2015–2020 morimekta.net. All rights reserved.