public abstract class

AbstractSerializationStreamWriter

extends AbstractSerializationStream
implements SerializationStreamWriter
java.lang.Object
   ↳ com.google.gwt.user.client.rpc.impl.AbstractSerializationStream
     ↳ com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter
Known Direct Subclasses

Class Overview

Base class for the client and server serialization streams. This class handles the basic serialization and deserialization formatting for primitive types since these are common between the client and the server. It also handles Object- and String-tracking for building graph references.

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.rpc.impl.AbstractSerializationStream
Public Constructors
AbstractSerializationStreamWriter()
Public Methods
static double[] getAsDoubleArray(long value)
Return a pair of doubles { low, high } that add up to the given number, such that "low" is always between 0 and 2^32-1 inclusive and "high" is always between -2^63 and 2^63-2^32 inclusive and is a multiple of 2^32.
void prepareToWrite()
abstract String toString()
void writeBoolean(boolean fieldValue)
void writeByte(byte fieldValue)
void writeChar(char ch)
void writeDouble(double fieldValue)
void writeFloat(float fieldValue)
void writeInt(int fieldValue)
abstract void writeLong(long value)
void writeObject(Object instance)
void writeShort(short value)
void writeString(String value)
Protected Methods
int addString(String string)
Add a string to the string table and return its index.
abstract void append(String token)
Append a token to the underlying output buffer.
int getIndexForObject(Object instance)
Get the index for an object that may have previously been saved via saveIndexForObject(Object).
abstract String getObjectTypeSignature(Object instance)
Compute and return the type signature for an object.
List<String> getStringTable()
Gets the string table.
static double[] makeLongComponents(int lowBits, int highBits)
void saveIndexForObject(Object instance)
Remember this object as having been seen before.
abstract void serialize(Object instance, String typeSignature)
Serialize an object into the stream.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.rpc.impl.AbstractSerializationStream
From class java.lang.Object
From interface com.google.gwt.user.client.rpc.SerializationStreamWriter

Public Constructors

public AbstractSerializationStreamWriter ()

Public Methods

public static double[] getAsDoubleArray (long value)

Return a pair of doubles { low, high } that add up to the given number, such that "low" is always between 0 and 2^32-1 inclusive and "high" is always between -2^63 and 2^63-2^32 inclusive and is a multiple of 2^32.

public void prepareToWrite ()

public abstract String toString ()

public void writeBoolean (boolean fieldValue)

public void writeByte (byte fieldValue)

public void writeChar (char ch)

public void writeDouble (double fieldValue)

public void writeFloat (float fieldValue)

public void writeInt (int fieldValue)

public abstract void writeLong (long value)

public void writeObject (Object instance)

public void writeShort (short value)

public void writeString (String value)

Protected Methods

protected int addString (String string)

Add a string to the string table and return its index.

Parameters
string the string to add
Returns
  • the index to the string

protected abstract void append (String token)

Append a token to the underlying output buffer.

Parameters
token the token to append

protected int getIndexForObject (Object instance)

Get the index for an object that may have previously been saved via saveIndexForObject(Object).

Parameters
instance the object to save
Returns
  • the index associated with this object, or -1 if this object hasn't been seen before

protected abstract String getObjectTypeSignature (Object instance)

Compute and return the type signature for an object.

Parameters
instance the instance to inspect
Returns
  • the type signature of the instance

protected List<String> getStringTable ()

Gets the string table.

protected static double[] makeLongComponents (int lowBits, int highBits)

protected void saveIndexForObject (Object instance)

Remember this object as having been seen before.

Parameters
instance the object to remember

protected abstract void serialize (Object instance, String typeSignature)

Serialize an object into the stream.

Parameters
instance the object to serialize
typeSignature the type signature of the object