|
||||||||||
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.CharacterRepresentation
public abstract class CharacterRepresentation
Representation based on a BIO character stream.
Field Summary |
---|
Fields inherited from class org.restlet.resource.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
CharacterRepresentation(MediaType mediaType)
Constructor. |
Method Summary | |
---|---|
java.nio.channels.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. |
java.io.InputStream |
getStream()
Returns a stream with the representation's content. |
void |
write(java.io.OutputStream outputStream)
Writes the representation to a byte stream. |
void |
write(java.nio.channels.WritableByteChannel writableChannel)
Writes the representation to a byte channel. |
Methods inherited from class org.restlet.resource.Representation |
---|
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDownloadName, getExpirationDate, getModificationDate, getRange, getReader, getSize, getTag, getText, isAvailable, isDownloadable, isTransient, release, setAvailable, setDigest, setDownloadable, setDownloadName, setExpirationDate, setModificationDate, setRange, setSize, setTag, setTransient, write |
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 CharacterRepresentation(MediaType mediaType)
mediaType
- The media type.Method Detail |
---|
public java.nio.channels.ReadableByteChannel getChannel() throws java.io.IOException
Representation
getChannel
in class Representation
java.io.IOException
public java.io.InputStream getStream() throws java.io.IOException
Representation
getStream
in class Representation
java.io.IOException
public void write(java.io.OutputStream outputStream) throws java.io.IOException
Representation
write
in class Representation
outputStream
- The output stream.
java.io.IOException
public void write(java.nio.channels.WritableByteChannel writableChannel) throws java.io.IOException
Representation
write
in class Representation
writableChannel
- A writable byte channel.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |