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 void
close()
boolean
equals(Object obj)
MutableContentMetadata
getContentMetadata()
Payload
getDelegate()
InputStream
getInput()
Creates a new InputStream object of the payload.Object
getRawContent()
Payload in its original form.int
hashCode()
boolean
isRepeatable()
Tells if the payload is capable of producing its data more than once.boolean
isSensitive()
Returns whether the payload contains sensitive information.InputStream
openStream()
Creates a new InputStream object of the payload.void
release()
release resources used by this entity.void
setContentMetadata(MutableContentMetadata in)
void
setSensitive(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:
openStream
in 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:
getRawContent
in interfacePayload
-
isRepeatable
public boolean isRepeatable()
Tells if the payload is capable of producing its data more than once.- Specified by:
isRepeatable
in interfacePayload
-
getDelegate
public Payload getDelegate()
-
release
public void release()
Description copied from interface:Payload
release resources used by this entity. This should be called when data is discarded.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getContentMetadata
public MutableContentMetadata getContentMetadata()
- Specified by:
getContentMetadata
in interfacePayload
-
setContentMetadata
public void setContentMetadata(MutableContentMetadata in)
- Specified by:
setContentMetadata
in interfacePayload
-
setSensitive
public void setSensitive(boolean isSensitive)
Description copied from interface:Payload
Sets 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:
setSensitive
in interfacePayload
-
isSensitive
public boolean isSensitive()
Description copied from interface:Payload
Returns 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:
isSensitive
in interfacePayload
-
-