
public final class ClientSerializationStreamWriter extends AbstractSerializationStreamWriter
DEFAULT_FLAGS, FLAG_ELIDE_TYPE_NAMES, FLAG_RPC_TOKEN_INCLUDED, RPC_SEPARATOR_CHAR, SERIALIZATION_STREAM_MIN_VERSION, SERIALIZATION_STREAM_VERSION, VALID_FLAGS_MASK| Constructor and Description |
|---|
ClientSerializationStreamWriter(Serializer serializer,
String moduleBaseURL,
String serializationPolicyStrongName)
Constructs a
ClientSerializationStreamWriter using the
specified module base URL and the serialization policy. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(String token)
Appends a token to the end of the buffer.
|
protected String |
getObjectTypeSignature(Object o)
Compute and return the type signature for an object.
|
void |
prepareToWrite()
Call this method before attempting to append any tokens.
|
static String |
quoteString(String str)
Quote characters in a user-supplied string to make sure they are safe to
send to the server.
|
protected void |
serialize(Object instance,
String typeSignature)
Serialize an object into the stream.
|
String |
toString()
Serializes the contents of this stream into a string.
|
void |
writeLong(long value) |
addString, getAsDoubleArray, getIndexForObject, getStringTable, makeLongComponents, saveIndexForObject, writeBoolean, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeObject, writeShort, writeStringaddFlags, areFlagsValid, getFlags, getVersion, hasFlags, setFlags, setVersionpublic ClientSerializationStreamWriter(Serializer serializer, String moduleBaseURL, String serializationPolicyStrongName)
ClientSerializationStreamWriter using the
specified module base URL and the serialization policy.serializer - the Serializer to usemoduleBaseURL - the location of the moduleserializationPolicyStrongName - the strong name of serialization
policypublic static String quoteString(String str)
str - string to quotepublic void prepareToWrite()
prepareToWrite in class AbstractSerializationStreamWriterpublic String toString()
SerializationStreamWritertoString in interface SerializationStreamWritertoString in class AbstractSerializationStreamWriterpublic void writeLong(long value)
writeLong in interface SerializationStreamWriterwriteLong in class AbstractSerializationStreamWriterprotected void append(String token)
append in class AbstractSerializationStreamWritertoken - the token to appendprotected String getObjectTypeSignature(Object o)
AbstractSerializationStreamWritergetObjectTypeSignature in class AbstractSerializationStreamWritero - the instance to inspectprotected void serialize(Object instance, String typeSignature) throws SerializationException
AbstractSerializationStreamWriterserialize in class AbstractSerializationStreamWriterinstance - the object to serializetypeSignature - the type signature of the objectSerializationExceptionCopyright © 2018. All rights reserved.