org.restlet.client.representation
Class StreamRepresentation

java.lang.Object
  extended by org.restlet.client.representation.Variant
      extended by org.restlet.client.representation.RepresentationInfo
          extended by org.restlet.client.representation.Representation
              extended by org.restlet.client.representation.StreamRepresentation
Direct Known Subclasses:
InputRepresentation

public abstract class StreamRepresentation
extends Representation

Representation based on a BIO stream.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.restlet.client.representation.Representation
UNKNOWN_SIZE
 
Constructor Summary
StreamRepresentation(MediaType mediaType)
          Constructor.
 
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.RepresentationInfo
getModificationDate, getTag, setModificationDate, setTag
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamRepresentation

public StreamRepresentation(MediaType mediaType)
Constructor.

Parameters:
mediaType - The media type.
Method Detail

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 S.A.S..