public class StreamingPayload extends Object implements Payload
Modifier and Type | Field and Description |
---|---|
protected MutableContentMetadata |
contentMetadata |
protected WriteTo |
writeTo |
protected boolean |
written |
Modifier | Constructor and Description |
---|---|
|
StreamingPayload(WriteTo writeTo) |
protected |
StreamingPayload(WriteTo writeTo,
MutableContentMetadata contentMetadata) |
Modifier and Type | Method and Description |
---|---|
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.
|
protected transient volatile boolean written
protected final WriteTo writeTo
protected MutableContentMetadata contentMetadata
public StreamingPayload(WriteTo writeTo)
protected StreamingPayload(WriteTo writeTo, MutableContentMetadata contentMetadata)
public Object getRawContent()
Payload
getRawContent
in interface Payload
UnsupportedOperationException
- this payload is for streaming writes onlypublic InputStream getInput()
Payload
getInput
in interface com.google.common.io.InputSupplier<InputStream>
getInput
in interface Payload
UnsupportedOperationException
- this payload is for streaming writes onlypublic void writeTo(OutputStream outstream) throws IOException
writeTo
in interface WriteTo
IOException
public boolean isRepeatable()
isRepeatable
in interface Payload
public void release()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public MutableContentMetadata getContentMetadata()
getContentMetadata
in interface Payload
public void setContentMetadata(MutableContentMetadata in)
setContentMetadata
in interface Payload
Copyright © 2009-2013 jclouds. All Rights Reserved.