T
- The class to serialize.public class ObjectRepresentation<T> extends StringRepresentation
UNKNOWN_SIZE
Constructor and Description |
---|
ObjectRepresentation(ClientProxy resource,
T object)
Constructor for serialization.
|
ObjectRepresentation(com.google.gwt.user.client.rpc.RemoteService remoteService,
T object)
Constructor for serialization.
|
ObjectRepresentation(com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory,
T object)
Constructor for serialization.
|
ObjectRepresentation(java.lang.String serializedObject,
ClientProxy resource)
Constructor for deserialization.
|
ObjectRepresentation(java.lang.String serializedObject,
com.google.gwt.user.client.rpc.RemoteService remoteService)
Constructor for deserialization.
|
ObjectRepresentation(java.lang.String serializedObject,
com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory)
Constructor for deserialization.
|
ObjectRepresentation(java.lang.String serializedObject,
com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory,
boolean string)
Constructor for deserialization.
|
Modifier and Type | Method and Description |
---|---|
T |
getObject()
The wrapped object.
|
com.google.gwt.user.client.rpc.SerializationStreamFactory |
getSerializationStreamFactory()
Returns the serialization stream factory.
|
java.lang.String |
getText()
Converts the representation to a string value.
|
boolean |
isString()
Indicates if the serialized object is a String.
|
void |
setObject(T object)
Sets the wrapped object.
|
void |
setSerializationStreamFactory(com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory)
Sets the serialization stream factory.
|
void |
setString(boolean string)
Indicates if the serialized object is a String.
|
getReader, getStream, release, setCharacterSet, setText, setText, toString, updateSize
append, exhaust, getAvailableSize, getDisposition, getExpirationDate, getRange, getSize, hasKnownSize, isAvailable, isEmpty, isTransient, setAvailable, setDisposition, setExpirationDate, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType
public ObjectRepresentation(ClientProxy resource, T object)
resource
- The remote resource from which to obtain the serialization
stream factory.object
- The object to serialize.public ObjectRepresentation(com.google.gwt.user.client.rpc.RemoteService remoteService, T object)
remoteService
- The remote service from which to obtain the serialization
stream factory.object
- The object to serialize.public ObjectRepresentation(com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory, T object)
serializationStreamFactory
- The serialization stream factory.object
- The object to serialize.public ObjectRepresentation(java.lang.String serializedObject, ClientProxy resource)
serializedObject
- The object serialization text.resource
- The remote resource from which to obtain the serialization
stream factory.public ObjectRepresentation(java.lang.String serializedObject, com.google.gwt.user.client.rpc.RemoteService remoteService)
serializedObject
- The object serialization text.remoteService
- The remote service from which to obtain the serialization
stream factory.public ObjectRepresentation(java.lang.String serializedObject, com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory)
serializedObject
- The object serialization text.serializationStreamFactory
- The serialization stream factory.public ObjectRepresentation(java.lang.String serializedObject, com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory, boolean string)
serializedObject
- The object serialization text.serializationStreamFactory
- The serialization stream factory.public T getObject()
public com.google.gwt.user.client.rpc.SerializationStreamFactory getSerializationStreamFactory()
public java.lang.String getText()
Representation
getText
in class StringRepresentation
public boolean isString()
public void setObject(T object)
object
- The wrapped object.public void setSerializationStreamFactory(com.google.gwt.user.client.rpc.SerializationStreamFactory serializationStreamFactory)
serializationStreamFactory
- The serialization stream factory.public void setString(boolean string)
string
- True if the serialized object is a String.Copyright © 2005-2024 Restlet.