org.jclouds.io.payloads
Class InputStreamPayload

java.lang.Object
  extended by org.jclouds.io.payloads.BasePayload<InputStream>
      extended by org.jclouds.io.payloads.InputStreamPayload
All Implemented Interfaces:
com.google.common.io.InputSupplier<InputStream>, Closeable, Payload

public class InputStreamPayload
extends BasePayload<InputStream>


Field Summary
 
Fields inherited from class org.jclouds.io.payloads.BasePayload
content, contentMetadata, written
 
Constructor Summary
InputStreamPayload(InputStream content)
           
 
Method Summary
 boolean isRepeatable()
          By default we are repeatable.
 InputStream openStream()
          Creates a new InputStream object of the payload.
 void release()
          if we created the stream, then it is already consumed on close.
 
Methods inherited from class org.jclouds.io.payloads.BasePayload
close, equals, getContentMetadata, getInput, getRawContent, hashCode, setContentMetadata, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputStreamPayload

public InputStreamPayload(InputStream content)
Method Detail

openStream

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


isRepeatable

public boolean isRepeatable()
By default we are repeatable.

Specified by:
isRepeatable in interface Payload
Overrides:
isRepeatable in class BasePayload<InputStream>

release

public void release()
if we created the stream, then it is already consumed on close.

Specified by:
release in interface Payload
Overrides:
release in class BasePayload<InputStream>


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.