| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jclouds.io.payloads.StreamingPayload
public class StreamingPayload
Note that not all services accept streaming payloads. For example, Rackspace CloudFiles accepts streaming while Amazon S3 does not.
| Field Summary | |
|---|---|
| protected  MutableContentMetadata | contentMetadata | 
| protected  WriteTo | writeTo | 
| protected  boolean | written | 
| Constructor Summary | |
|---|---|
|   | StreamingPayload(WriteTo writeTo) | 
| protected  | StreamingPayload(WriteTo writeTo,
                 MutableContentMetadata contentMetadata) | 
| Method Summary | |
|---|---|
|  void | close()Delegates to release() | 
|  boolean | equals(Object obj) | 
|  MutableContentMetadata | getContentMetadata() | 
|  InputStream | getInput()Creates a new InputStream object of the payload. | 
|  Object | getRawContent()Payload in its original form. | 
|  int | hashCode() | 
|  boolean | isRepeatable()By default we are not repeatable. | 
|  void | release()By default there are no resources to release. | 
|  void | setContentMetadata(MutableContentMetadata in) | 
|  String | toString() | 
|  void | writeTo(OutputStream outstream)Writes the payload content to the output stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected transient volatile boolean written
protected final WriteTo writeTo
protected MutableContentMetadata contentMetadata
| Constructor Detail | 
|---|
public StreamingPayload(WriteTo writeTo)
protected StreamingPayload(WriteTo writeTo,
                           MutableContentMetadata contentMetadata)
| Method Detail | 
|---|
public Object getRawContent()
Payload
getRawContent in interface PayloadUnsupportedOperationException - this payload is for streaming writes onlypublic InputStream getInput()
Payload
getInput in interface com.google.common.io.InputSupplier<InputStream>getInput in interface PayloadUnsupportedOperationException - this payload is for streaming writes only
public void writeTo(OutputStream outstream)
             throws IOException
writeTo in interface WriteToIOExceptionpublic String toString()
toString in class Objectpublic boolean isRepeatable()
isRepeatable in interface Payloadpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic void release()
release in interface Payloadpublic void close()
close in interface Closeablepublic MutableContentMetadata getContentMetadata()
getContentMetadata in interface Payloadpublic void setContentMetadata(MutableContentMetadata in)
setContentMetadata in interface Payload| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||