|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.representation.EmptyRepresentation
public class EmptyRepresentation
Empty representation with no content. It is always considered available but
calling the getText()
method for example will return an empty
string. It can also have regular metadata available.
Field Summary |
---|
Fields inherited from class org.restlet.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
EmptyRepresentation()
Constructor. |
Method Summary | |
---|---|
ReadableByteChannel |
getChannel()
Returns a channel with the representation's content. If it is supported by a file, a read-only instance of FileChannel is returned. This method is ensured to return a fresh channel for each invocation unless it is a transient representation, in which case null is returned. |
Reader |
getReader()
Returns a characters reader with the representation's content. |
InputStream |
getStream()
Returns a stream with the representation's content. |
String |
getText()
Converts the representation to a string value. |
void |
write(OutputStream outputStream)
Writes the representation to a byte stream. |
void |
write(WritableByteChannel writableChannel)
Writes the representation to a byte channel. |
void |
write(Writer writer)
Writes the representation to a characters writer. |
Methods inherited from class org.restlet.representation.Representation |
---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient |
Methods inherited from class org.restlet.representation.RepresentationInfo |
---|
getModificationDate, getTag, setModificationDate, setTag |
Methods inherited from class org.restlet.representation.Variant |
---|
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EmptyRepresentation()
Method Detail |
---|
public ReadableByteChannel getChannel() throws IOException
Representation
getChannel
in class Representation
IOException
public Reader getReader() throws IOException
Representation
getReader
in class Representation
IOException
public InputStream getStream() throws IOException
Representation
getStream
in class Representation
IOException
public String getText() throws IOException
Representation
getText
in class Representation
IOException
public void write(Writer writer) throws IOException
Representation
Writer
after writing to it as this will be handled
by the Restlet connectors automatically.
write
in class Representation
writer
- The characters writer.
IOException
public void write(WritableByteChannel writableChannel) throws IOException
Representation
write
in class Representation
writableChannel
- A writable byte channel.
IOException
public void write(OutputStream outputStream) throws IOException
Representation
OutputStream
after writing to it as this will be handled by
the Restlet connectors automatically.
write
in class Representation
outputStream
- The output stream.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |