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
 CipherInputStream getInput()
          Creates a new InputStream object of the payload.
abstract  Cipher initializeCipher(Key key)
           
 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, 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)

getInput

public CipherInputStream getInput()
Description copied from class: DelegatingPayload
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
Overrides:
getInput in class DelegatingPayload

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-2012 jclouds. All Rights Reserved.