public abstract class WritableRepresentation extends ChannelRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
WritableRepresentation(MediaType mediaType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.nio.channels.ReadableByteChannel |
getChannel()
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 |
release()
Calls parent's implementation.
|
abstract void |
write(java.nio.channels.WritableByteChannel writableChannel)
Writes the representation to a byte channel.
|
getReader, getStream, write, writecheckDigest, checkDigest, computeDigest, createEmpty, exhaust, getAvailableSize, getDigest, getDisposition, getDownloadName, getExpirationDate, getRange, getSize, getText, isAvailable, isDownloadable, isTransient, setAvailable, setDigest, setDisposition, setDownloadable, setDownloadName, setExpirationDate, setRange, setSize, setTransientgetModificationDate, getTag, setModificationDate, setTagcreateClientInfo, equals, getCharacterSet, getEncodings, getIdentifier, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, toStringpublic WritableRepresentation(MediaType mediaType)
mediaType - The representation's media type.public java.nio.channels.ReadableByteChannel getChannel()
throws java.io.IOException
RepresentationgetChannel in class Representationjava.io.IOExceptionpublic void release()
release in class Representationpublic abstract void write(java.nio.channels.WritableByteChannel writableChannel)
throws java.io.IOException
Representationwrite in class RepresentationwritableChannel - A writable byte channel.java.io.IOExceptionCopyright © 2005-2012. All Rights Reserved.