|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.restlet.resource.Variant
org.restlet.resource.Representation
org.restlet.resource.StreamRepresentation
org.restlet.resource.OutputRepresentation
org.restlet.resource.ObjectRepresentation<T>
T - The class to serialize, see Serializablepublic class ObjectRepresentation<T extends Serializable>
Representation based on a serializable Java object.
| Field Summary |
|---|
| Fields inherited from class org.restlet.resource.Representation |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
ObjectRepresentation(Representation serializedRepresentation)
Constructor reading the object from a serialized representation. |
|
ObjectRepresentation(T object)
Constructor |
|
| Method Summary | |
|---|---|
T |
getObject()
Returns the represented object. |
void |
release()
Releases the represented object. |
void |
setObject(T object)
Sets the represented object. |
void |
write(OutputStream outputStream)
Writes the representation to a byte stream. |
| Methods inherited from class org.restlet.resource.OutputRepresentation |
|---|
getStream |
| Methods inherited from class org.restlet.resource.StreamRepresentation |
|---|
getChannel, getReader, write, write |
| Methods inherited from class org.restlet.resource.Representation |
|---|
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDownloadName, getExpirationDate, getModificationDate, getRange, getSize, getTag, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDownloadable, setDownloadName, setExpirationDate, setModificationDate, setRange, setSize, setTag, setTransient |
| Methods inherited from class org.restlet.resource.Variant |
|---|
getCharacterSet, getEncodings, getIdentifier, getLanguages, getMediaType, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setMediaType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectRepresentation(Representation serializedRepresentation)
throws IOException,
ClassNotFoundException,
IllegalArgumentException
serializedRepresentation - The serialized representation.
IOException
ClassNotFoundException
IllegalArgumentExceptionpublic ObjectRepresentation(T object)
object - The serializable object.| Method Detail |
|---|
public T getObject()
throws IOException
IOExceptionpublic void release()
release in class OutputRepresentationpublic void setObject(T object)
object - The represented object.
public void write(OutputStream outputStream)
throws IOException
Representation
write in class RepresentationoutputStream - The output stream.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||