org.jclouds.io.payloads
Class DelegatingPayload

java.lang.Object
  extended by org.jclouds.io.payloads.DelegatingPayload
All Implemented Interfaces:
com.google.common.io.InputSupplier<InputStream>, Closeable, Payload, WriteTo
Direct Known Subclasses:
BaseCipherPayload, Part

public class DelegatingPayload
extends Object
implements Payload

Author:
Adrian Cole

Constructor Summary
DelegatingPayload(Payload delegate)
           
 
Method Summary
 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.
 void release()
          release resources used by this entity.
 void setContentMetadata(MutableContentMetadata in)
           
 void writeTo(OutputStream outstream)
          Writes the payload content to the output stream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingPayload

public DelegatingPayload(Payload delegate)
Method Detail

getInput

public InputStream getInput()
Creates a new InputStream object of the payload.

Specified by:
getInput in interface com.google.common.io.InputSupplier<InputStream>
Specified by:
getInput in interface Payload

getRawContent

public Object getRawContent()
Payload in its original form.

Specified by:
getRawContent in interface Payload

isRepeatable

public boolean isRepeatable()
Tells if the payload is capable of producing its data more than once.

Specified by:
isRepeatable in interface Payload

writeTo

public void writeTo(OutputStream outstream)
             throws IOException
Writes the payload content to the output stream.

Specified by:
writeTo in interface WriteTo
Throws:
IOException

hashCode

public int hashCode()

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

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.

Specified by:
release in interface Payload

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

getContentMetadata

public MutableContentMetadata getContentMetadata()
Specified by:
getContentMetadata in interface Payload

setContentMetadata

public void setContentMetadata(MutableContentMetadata in)
Specified by:
setContentMetadata in interface Payload


Copyright © 2009-2012 jclouds. All Rights Reserved.