|
Restlet Framework 2.2.2 Google Web Toolkit |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.client.representation.Variant
org.restlet.client.representation.RepresentationInfo
org.restlet.client.representation.Representation
org.restlet.client.representation.StreamRepresentation
org.restlet.client.representation.InputRepresentation
public class InputRepresentation
Transient representation based on a BIO input stream.
Field Summary |
---|
Fields inherited from class org.restlet.client.representation.Representation |
---|
UNKNOWN_SIZE |
Constructor Summary | |
---|---|
InputRepresentation(InputStream inputStream)
Constructor. |
|
InputRepresentation(InputStream inputStream,
MediaType mediaType)
Constructor. |
|
InputRepresentation(InputStream inputStream,
MediaType mediaType,
long expectedSize)
Constructor. |
Method Summary | |
---|---|
InputStream |
getStream()
Returns a stream with the representation's content. |
String |
getText()
Note that this method relies on getStream() . |
void |
release()
Closes and releases the input stream. |
void |
setStream(InputStream stream)
Sets the input stream to use. |
Methods inherited from class org.restlet.client.representation.StreamRepresentation |
---|
getReader |
Methods inherited from class org.restlet.client.representation.Representation |
---|
append, exhaust, getAvailableSize, getDisposition, getExpirationDate, getRange, getSize, hasKnownSize, isAvailable, isEmpty, isTransient, 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 |
---|
public InputRepresentation(InputStream inputStream)
inputStream
- The representation's stream.public InputRepresentation(InputStream inputStream, MediaType mediaType)
inputStream
- The representation's stream.mediaType
- The representation's media type.public InputRepresentation(InputStream inputStream, MediaType mediaType, long expectedSize)
inputStream
- The representation's stream.mediaType
- The representation's media type.expectedSize
- The expected input stream size.Method Detail |
---|
public InputStream getStream() throws IOException
Representation
getStream
in class Representation
IOException
public String getText() throws IOException
getStream()
. This stream is
closed once fully read.
getText
in class Representation
IOException
public void release()
release
in class Representation
public void setStream(InputStream stream)
stream
- The input stream to use.
|
Restlet Framework 2.2.2 Google Web Toolkit |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |