Class ByteSourcePayload

java.lang.Object
org.jclouds.io.payloads.BasePayload<com.google.common.io.ByteSource>
org.jclouds.io.payloads.ByteSourcePayload
All Implemented Interfaces:
Closeable, AutoCloseable, Payload

public class ByteSourcePayload extends BasePayload<com.google.common.io.ByteSource>
A repeatable, ByteSource-backed Payload.
  • Constructor Details

    • ByteSourcePayload

      public ByteSourcePayload(com.google.common.io.ByteSource content)
  • Method Details

    • openStream

      public InputStream openStream() throws IOException
      Description copied from interface: Payload
      Creates a new InputStream object of the payload.
      Throws:
      IOException
    • isRepeatable

      public boolean isRepeatable()
      Description copied from class: BasePayload
      By default we are repeatable.
      Specified by:
      isRepeatable in interface Payload
      Overrides:
      isRepeatable in class BasePayload<com.google.common.io.ByteSource>
    • 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<com.google.common.io.ByteSource>