public class ReadableRepresentation extends ChannelRepresentation
UNKNOWN_SIZE| Constructor and Description | 
|---|
| ReadableRepresentation(java.nio.channels.ReadableByteChannel readableChannel,
                      MediaType mediaType)Constructor. | 
| ReadableRepresentation(java.nio.channels.ReadableByteChannel channel,
                      MediaType mediaType,
                      long expectedSize)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| java.nio.channels.ReadableByteChannel | getChannel()Returns a channel with the representation's content. | 
| void | setChannel(java.nio.channels.ReadableByteChannel channel)Sets the readable channel. | 
| void | write(java.nio.channels.WritableByteChannel writableChannel)Writes the representation to a byte channel. | 
getReader, getStream, write, writeappend, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getSize, getText, hasKnownSize, isAvailable, isEmpty, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setRange, setSize, setTransientgetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic ReadableRepresentation(java.nio.channels.ReadableByteChannel readableChannel,
                              MediaType mediaType)
readableChannel - The representation's channel.mediaType - The representation's media type.public ReadableRepresentation(java.nio.channels.ReadableByteChannel channel,
                              MediaType mediaType,
                              long expectedSize)
channel - The representation's channel.mediaType - The representation's media type.expectedSize - The expected stream size.public java.nio.channels.ReadableByteChannel getChannel()
                                                 throws java.io.IOException
RepresentationgetChannel in class Representationjava.io.IOExceptionpublic void setChannel(java.nio.channels.ReadableByteChannel channel)
channel - The readable channel.public void write(java.nio.channels.WritableByteChannel writableChannel)
           throws java.io.IOException
Representationwrite in class RepresentationwritableChannel - A writable byte channel.java.io.IOExceptionCopyright © 2005-2024 Restlet.