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 |
|---|---|
ReadableByteChannel |
getChannel()
Deprecated.
|
Reader |
getReader()
Returns a characters reader with the representation's content.
|
InputStream |
getStream()
Returns a stream with the representation's content.
|
String |
getText()
Converts the representation to a string value.
|
void |
write(OutputStream outputStream)
Writes the representation to a byte stream.
|
void |
write(WritableByteChannel writableChannel)
Deprecated.
|
void |
write(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, toString@Deprecated public ReadableByteChannel getChannel() throws IOException
RepresentationgetChannel in class RepresentationIOExceptionpublic Reader getReader() throws IOException
RepresentationgetReader in class RepresentationIOExceptionpublic InputStream getStream() throws IOException
RepresentationgetStream in class RepresentationIOExceptionpublic String getText() throws IOException
RepresentationgetText in class RepresentationIOExceptionpublic void write(Writer writer) throws IOException
RepresentationWriter after writing to it as this will be handled by
the Restlet connectors automatically.write in class Representationwriter - The characters writer.IOException@Deprecated public void write(WritableByteChannel writableChannel) throws IOException
Representationwrite in class RepresentationwritableChannel - A writable byte channel.IOExceptionpublic void write(OutputStream outputStream) throws IOException
RepresentationOutputStream after writing to it as this will be handled by the
Restlet connectors automatically.write in class RepresentationoutputStream - The output stream.IOExceptionCopyright © 2005–2025. All rights reserved.