@Deprecated public class ReadableRepresentation extends ChannelRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
ReadableRepresentation(ReadableByteChannel readableChannel,
MediaType mediaType)
Deprecated.
Constructor.
|
ReadableRepresentation(ReadableByteChannel channel,
MediaType mediaType,
long expectedSize)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ReadableByteChannel |
getChannel()
Deprecated.
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. |
void |
setChannel(ReadableByteChannel channel)
Deprecated.
Sets the readable channel.
|
void |
write(WritableByteChannel writableChannel)
Deprecated.
Writes the representation to a byte channel.
|
getReader, getStream, write, writeappend, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransientgetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic ReadableRepresentation(ReadableByteChannel readableChannel, MediaType mediaType)
readableChannel - The representation's channel.mediaType - The representation's media type.public ReadableRepresentation(ReadableByteChannel channel, MediaType mediaType, long expectedSize)
channel - The representation's channel.mediaType - The representation's media type.expectedSize - The expected stream size.public ReadableByteChannel getChannel() throws IOException
RepresentationgetChannel in class RepresentationIOExceptionpublic void setChannel(ReadableByteChannel channel)
channel - The readable channel.public void write(WritableByteChannel writableChannel) throws IOException
Representationwrite in class RepresentationwritableChannel - A writable byte channel.IOExceptionCopyright © 2005–2025. All rights reserved.