|
||||||||||
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 Serializable
public class ObjectRepresentation<T extends java.io.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(java.io.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 java.io.IOException, java.lang.ClassNotFoundException, java.lang.IllegalArgumentException
serializedRepresentation
- The serialized representation.
java.io.IOException
java.lang.ClassNotFoundException
java.lang.IllegalArgumentException
public ObjectRepresentation(T object)
object
- The serializable object.Method Detail |
---|
public T getObject() throws java.io.IOException
java.io.IOException
public void release()
release
in class OutputRepresentation
public void setObject(T object)
object
- The represented object.public void write(java.io.OutputStream outputStream) throws java.io.IOException
Representation
write
in class Representation
outputStream
- The output stream.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |