public class EmptyRepresentation extends Representation
getText() method for example will return an empty
string. It can also have regular metadata available.UNKNOWN_SIZE| Constructor and Description |
|---|
EmptyRepresentation()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.nio.channels.ReadableByteChannel |
getChannel()
Returns a channel with the representation's content.
|
java.io.Reader |
getReader()
Returns a characters reader with the representation's content.
|
java.io.InputStream |
getStream()
Returns a stream with the representation's content.
|
java.lang.String |
getText()
Converts the representation to a string value.
|
void |
write(java.io.OutputStream outputStream)
Writes the representation to a byte stream.
|
void |
write(java.nio.channels.WritableByteChannel writableChannel)
Writes the representation to a byte channel.
|
void |
write(java.io.Writer writer)
Writes the representation to a characters writer.
|
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, 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 java.nio.channels.ReadableByteChannel getChannel()
throws java.io.IOException
RepresentationgetChannel in class Representationjava.io.IOExceptionpublic java.io.Reader getReader()
throws java.io.IOException
RepresentationgetReader in class Representationjava.io.IOExceptionpublic java.io.InputStream getStream()
throws java.io.IOException
RepresentationgetStream in class Representationjava.io.IOExceptionpublic java.lang.String getText()
throws java.io.IOException
RepresentationgetText in class Representationjava.io.IOExceptionpublic void write(java.io.Writer writer)
throws java.io.IOException
RepresentationWriter after writing to it as this will be handled
by the Restlet connectors automatically.write in class Representationwriter - The characters writer.java.io.IOExceptionpublic void write(java.nio.channels.WritableByteChannel writableChannel)
throws java.io.IOException
Representationwrite in class RepresentationwritableChannel - A writable byte channel.java.io.IOExceptionpublic void write(java.io.OutputStream outputStream)
throws java.io.IOException
RepresentationOutputStream after writing to it as this will be handled by
the Restlet connectors automatically.write in class RepresentationoutputStream - The output stream.java.io.IOExceptionCopyright © 2005-2024 Restlet.