public class CryptoSourceReader<T> extends java.lang.Object implements SourceReader<java.io.InputStream,T>
SourceReader r
to decrypt whatever r reads from the source InputStream.| Constructor and Description |
|---|
CryptoSourceReader(CipherFactory crypto,
SourceReader<java.io.InputStream,T> reader)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
T |
read(java.io.InputStream source)
Reads a
T-value from the data source. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waituncheckedReadpublic CryptoSourceReader(CipherFactory crypto, SourceReader<java.io.InputStream,T> reader)
crypto - factory to create encryption ciphers.reader - the underlying reader that actually pulls the
T-value out of the source InputStream.java.lang.NullPointerException - if any argument is null.public T read(java.io.InputStream source) throws java.lang.Exception
SourceReaderT-value from the data source.read in interface SourceReader<java.io.InputStream,T>source - the data source.java.lang.NullPointerException - if the argument is null.java.lang.Exception - if the value could not be read.