|
||||||||||
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.CharacterRepresentation
public abstract class CharacterRepresentation
Representation based on a BIO character stream.
Field Summary |
---|
Fields inherited from class org.restlet.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
CharacterRepresentation(MediaType mediaType)
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. |
InputStream |
getStream()
Returns a stream with the representation's content. |
void |
write(OutputStream outputStream)
Writes the representation to a byte stream. |
void |
write(WritableByteChannel writableChannel)
Writes the representation to a byte channel. |
Methods inherited from class org.restlet.representation.Representation |
---|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getReader, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient, write |
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 CharacterRepresentation(MediaType mediaType)
mediaType
- The media type.Method Detail |
---|
public ReadableByteChannel getChannel() throws IOException
Representation
getChannel
in class Representation
IOException
public InputStream getStream() throws IOException
Representation
getStream
in class Representation
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
public void write(WritableByteChannel writableChannel) throws IOException
Representation
write
in class Representation
writableChannel
- A writable byte channel.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |