com.google.gwt.user.client.rpc
Class SerializationStream
java.lang.Object
com.google.gwt.user.client.rpc.SerializationStream
- All Implemented Interfaces:
- SerializationStreamObjectDecoder, SerializationStreamObjectEncoder, SerializationStreamReader, SerializationStreamWriter, StringTable
- Direct Known Subclasses:
- ClientSerializationStream, ServerSerializationStream
- public abstract class SerializationStream
- extends Object
- implements SerializationStreamReader, SerializationStreamWriter, SerializationStreamObjectDecoder, SerializationStreamObjectEncoder, StringTable
Base class for the client and server serialization streams. This class handles
the basic serialization and desirialization formatting for primitive types
since these are common between the client and the server.
NEW_INSTANCE_MARKER
public static final String NEW_INSTANCE_MARKER
- See Also:
- Constant Field Values
PREV_INSTANCE_MARKER
public static final String PREV_INSTANCE_MARKER
- See Also:
- Constant Field Values
NULL_INSTANCE_MARKER
public static final String NULL_INSTANCE_MARKER
- See Also:
- Constant Field Values
SERIALIZATION_STREAM_VERSION
public static final int SERIALIZATION_STREAM_VERSION
- See Also:
- Constant Field Values
SERIALIZATION_STREAM_FLAGS_NO_TYPE_VERSIONING
public static final int SERIALIZATION_STREAM_FLAGS_NO_TYPE_VERSIONING
- See Also:
- Constant Field Values
flags
protected int flags
version
protected int version
SerializationStream
public SerializationStream()
addFlags
public void addFlags(int flags)
getFlags
public int getFlags()
setFlags
public void setFlags(int flags)
setVersion
protected void setVersion(int version)
getVersion
public int getVersion()
shouldEnforceTypeVersioning
public boolean shouldEnforceTypeVersioning()
append
protected abstract void append(String string)
extract
protected abstract String extract()
prepareToRead
public abstract void prepareToRead(String encodedString)
prepareToWrite
public abstract void prepareToWrite()
getObjectDecoder
public abstract SerializationStreamObjectDecoder getObjectDecoder()
- Specified by:
getObjectDecoder
in interface SerializationStreamReader
readBoolean
public boolean readBoolean()
- Specified by:
readBoolean
in interface SerializationStreamReader
readByte
public byte readByte()
- Specified by:
readByte
in interface SerializationStreamReader
readChar
public char readChar()
- Character.MinValue and Character.MaxValue are special or cause special
problems. Character.MaxValue is used as the stream token delimiter so it
is special cased here. Character.MinValue is causes problems on the server
when the payload of the request is converted to UTF8. So, we escape them
here
- Specified by:
readChar
in interface SerializationStreamReader
readDouble
public double readDouble()
- Specified by:
readDouble
in interface SerializationStreamReader
readFloat
public float readFloat()
- Specified by:
readFloat
in interface SerializationStreamReader
readInt
public int readInt()
- Specified by:
readInt
in interface SerializationStreamReader
readLong
public long readLong()
- Specified by:
readLong
in interface SerializationStreamReader
readShort
public short readShort()
- Specified by:
readShort
in interface SerializationStreamReader
getObjectEncoder
public abstract SerializationStreamObjectEncoder getObjectEncoder()
- Specified by:
getObjectEncoder
in interface SerializationStreamWriter
writeBoolean
public void writeBoolean(boolean fieldValue)
- Specified by:
writeBoolean
in interface SerializationStreamWriter
writeByte
public void writeByte(byte fieldValue)
- Specified by:
writeByte
in interface SerializationStreamWriter
writeChar
public void writeChar(char ch)
- Character.MinValue and Character.MaxValue are special or cause special
problems. Character.MaxValue is used as the stream token delimiter so it
is special cased here. Character.MinValue is causes problems on the server
when the payload of the request is converted to UTF8 (not really certain
why). So, we escape them here
- Specified by:
writeChar
in interface SerializationStreamWriter
writeDouble
public void writeDouble(double fieldValue)
- Specified by:
writeDouble
in interface SerializationStreamWriter
writeFloat
public void writeFloat(float fieldValue)
- Specified by:
writeFloat
in interface SerializationStreamWriter
writeInt
public void writeInt(int fieldValue)
- Specified by:
writeInt
in interface SerializationStreamWriter
writeLong
public void writeLong(long fieldValue)
- Specified by:
writeLong
in interface SerializationStreamWriter
writeShort
public void writeShort(short value)
- Specified by:
writeShort
in interface SerializationStreamWriter
This javadoc distribution was not produced by Google. The official documentation is here.