Package org.jclouds.io.payloads
Class DelegatingPayload
- java.lang.Object
-
- org.jclouds.io.payloads.DelegatingPayload
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Payload
- Direct Known Subclasses:
BaseCipherPayload,Part
public class DelegatingPayload extends Object implements Payload
-
-
Constructor Summary
Constructors Constructor Description DelegatingPayload(Payload delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanequals(Object obj)MutableContentMetadatagetContentMetadata()PayloadgetDelegate()InputStreamgetInput()Creates a new InputStream object of the payload.ObjectgetRawContent()Payload in its original form.inthashCode()booleanisRepeatable()Tells if the payload is capable of producing its data more than once.booleanisSensitive()Returns whether the payload contains sensitive information.InputStreamopenStream()Creates a new InputStream object of the payload.voidrelease()release resources used by this entity.voidsetContentMetadata(MutableContentMetadata in)voidsetSensitive(boolean isSensitive)Sets whether the payload contains sensitive information.
-
-
-
Constructor Detail
-
DelegatingPayload
public DelegatingPayload(Payload delegate)
-
-
Method Detail
-
openStream
public InputStream openStream() throws IOException
Creates a new InputStream object of the payload.- Specified by:
openStreamin interfacePayload- Throws:
IOException
-
getInput
public InputStream getInput()
Creates a new InputStream object of the payload.
-
getRawContent
public Object getRawContent()
Payload in its original form.- Specified by:
getRawContentin interfacePayload
-
isRepeatable
public boolean isRepeatable()
Tells if the payload is capable of producing its data more than once.- Specified by:
isRepeatablein interfacePayload
-
getDelegate
public Payload getDelegate()
-
release
public void release()
Description copied from interface:Payloadrelease resources used by this entity. This should be called when data is discarded.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getContentMetadata
public MutableContentMetadata getContentMetadata()
- Specified by:
getContentMetadatain interfacePayload
-
setContentMetadata
public void setContentMetadata(MutableContentMetadata in)
- Specified by:
setContentMetadatain interfacePayload
-
setSensitive
public void setSensitive(boolean isSensitive)
Description copied from interface:PayloadSets whether the payload contains sensitive information. This is used when trying to decide whether to print out the payload information or not in logs- Specified by:
setSensitivein interfacePayload
-
isSensitive
public boolean isSensitive()
Description copied from interface:PayloadReturns whether the payload contains sensitive information. This is used when trying to decide whether to print out the payload information or not in logs- Specified by:
isSensitivein interfacePayload
-
-