public abstract class WriterRepresentation extends CharacterRepresentation
UNKNOWN_SIZE
Constructor and Description |
---|
WriterRepresentation(MediaType mediaType)
Constructor.
|
WriterRepresentation(MediaType mediaType,
long expectedSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.io.Reader |
getReader()
Returns a characters reader with the representation's content.
|
void |
release()
Calls parent's implementation.
|
void |
write(java.io.OutputStream outputStream)
Writes the representation to a byte stream.
|
getChannel, getStream, write
checkDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransient, write
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public WriterRepresentation(MediaType mediaType)
mediaType
- The representation's mediaType.public WriterRepresentation(MediaType mediaType, long expectedSize)
mediaType
- The representation's mediaType.expectedSize
- The expected writer size in bytes.public java.io.Reader getReader() throws java.io.IOException
Representation
getReader
in class Representation
java.io.IOException
public void release()
release
in class Representation
public void write(java.io.OutputStream outputStream) throws java.io.IOException
Representation
OutputStream
after writing to it as this will be handled by
the Restlet connectors automatically.write
in class CharacterRepresentation
outputStream
- The output stream.java.io.IOException
Copyright © 2005-2012. All Rights Reserved.