public abstract class ChannelRepresentation extends Representation
UNKNOWN_SIZE
Constructor and Description |
---|
ChannelRepresentation(MediaType mediaType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Reader |
getReader()
Returns a characters reader with the representation's content.
|
InputStream |
getStream()
Returns a stream with the representation's content.
|
void |
write(OutputStream outputStream)
Writes the representation to a byte stream.
|
void |
write(Writer writer)
Writes the representation to a characters writer.
|
append, exhaust, getAvailableSize, getChannel, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient, write
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public ChannelRepresentation(MediaType mediaType)
mediaType
- The media type.public Reader getReader() throws IOException
Representation
getReader
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(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
Copyright © 2005–2014. All rights reserved.