org.jclouds.io.payloads
Class BaseCipherPayload

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

public abstract class BaseCipherPayload
extends DelegatingPayload

Author:
Adrian Cole

Constructor Summary
BaseCipherPayload(Payload delegate, Key key)
           
 
Method Summary
abstract  Cipher initializeCipher(Key key)
           
 CipherInputStream openStream()
          Creates a new InputStream object of the payload.
 void writeTo(OutputStream outstream)
          Writes the payload content to the output stream.
 
Methods inherited from class org.jclouds.io.payloads.DelegatingPayload
close, equals, getContentMetadata, getDelegate, getInput, getRawContent, hashCode, isRepeatable, release, setContentMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCipherPayload

public BaseCipherPayload(Payload delegate,
                         Key key)
Method Detail

initializeCipher

public abstract Cipher initializeCipher(Key key)

openStream

public CipherInputStream openStream()
                             throws IOException
Description copied from class: DelegatingPayload
Creates a new InputStream object of the payload.

Specified by:
openStream in interface Payload
Overrides:
openStream in class DelegatingPayload
Throws:
IOException

writeTo

public void writeTo(OutputStream outstream)
             throws IOException
Description copied from class: DelegatingPayload
Writes the payload content to the output stream.

Specified by:
writeTo in interface WriteTo
Overrides:
writeTo in class DelegatingPayload
Throws:
IOException


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