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.
|
abstract void |
write(java.nio.channels.WritableByteChannel writableChannel)
Writes the representation to a byte channel.
|
getReader, getStream, write, write
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, getText, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, release, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient
getModificationDate, getTag, setModificationDate, setTag
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
public WritableRepresentation(MediaType mediaType)
mediaType
- The representation's media type.public java.nio.channels.ReadableByteChannel getChannel() throws java.io.IOException
Representation
getChannel
in class Representation
java.io.IOException
public abstract void write(java.nio.channels.WritableByteChannel writableChannel) throws java.io.IOException
Representation
write
in class Representation
writableChannel
- A writable byte channel.java.io.IOException
Copyright © 2005-2024 Restlet.