public abstract class OutputRepresentation extends StreamRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
OutputRepresentation(MediaType mediaType)
Constructor.
|
OutputRepresentation(MediaType mediaType,
long expectedSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.nio.channels.ReadableByteChannel |
getChannel()
Returns a channel with the representation's content.
|
java.io.InputStream |
getStream()
Returns a stream with the representation's content.
|
getReader, write, writeappend, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getSize, getText, hasKnownSize, isAvailable, isEmpty, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setRange, setSize, setTransient, writegetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic OutputRepresentation(MediaType mediaType)
mediaType - The representation's mediaType.public OutputRepresentation(MediaType mediaType, long expectedSize)
mediaType - The representation's mediaType.expectedSize - The expected input stream size.public java.nio.channels.ReadableByteChannel getChannel()
throws java.io.IOException
RepresentationgetChannel in class StreamRepresentationjava.io.IOExceptionpublic java.io.InputStream getStream()
throws java.io.IOException
getStream in class Representationjava.io.IOExceptionCopyright © 2005-2024 Restlet.