org.restlet.client.representation
Class StreamRepresentation
java.lang.Object
org.restlet.client.representation.Variant
org.restlet.client.representation.RepresentationInfo
org.restlet.client.representation.Representation
org.restlet.client.representation.StreamRepresentation
- Direct Known Subclasses:
- InputRepresentation
public abstract class StreamRepresentation
- extends Representation
Representation based on a BIO stream.
- Author:
- Jerome Louvel
Method Summary |
Reader |
getReader()
Returns a characters reader with the representation's content. |
Methods inherited from class org.restlet.client.representation.Representation |
append, exhaust, getAvailableSize, getDisposition, getExpirationDate, getRange, getSize, getStream, getText, hasKnownSize, isAvailable, isEmpty, isTransient, release, setAvailable, setDisposition, setExpirationDate, setRange, setSize, setTransient |
Methods inherited from class org.restlet.client.representation.Variant |
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString |
StreamRepresentation
public StreamRepresentation(MediaType mediaType)
- Constructor.
- Parameters:
mediaType
- The media type.
getReader
public Reader getReader()
throws IOException
- Description copied from class:
Representation
- Returns a characters reader with the representation's content. This
method is ensured to return a fresh reader for each invocation unless it
is a transient representation, in which case null is returned. If the
representation has no character set defined, the system's default one
will be used.
- Specified by:
getReader
in class Representation
- Returns:
- A reader with the representation's content.
- Throws:
IOException
Copyright © 2005-2013 Restlet.