Class DecryptionInputStream
java.lang.Object
java.io.InputStream
org.refcodes.security.DecryptionInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable, org.refcodes.mixin.Disposable
A
DecryptionInputStream wraps an InputStream and consumes
input bytes by applying a Decrypter on each byte read from the
provided InputStream before passing back the processed byte to the
caller. The input of the DecryptionInputStream can be converted back
by the according EncryptionOutputStream.-
Constructor Summary
ConstructorsConstructorDescriptionDecryptionInputStream(InputStream aInputStream, Decrypter<byte[], byte[], DecryptionException> aDecrypter) Constructs theDecryptionInputStreamby wrapping the givenInputStreamfor the providedDecrypterto be applied on the bytes to be read. -
Method Summary
Methods inherited from class InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
DecryptionInputStream
public DecryptionInputStream(InputStream aInputStream, Decrypter<byte[], byte[], DecryptionException> aDecrypter) Constructs theDecryptionInputStreamby wrapping the givenInputStreamfor the providedDecrypterto be applied on the bytes to be read.- Parameters:
aInputStream- TheInputStreamto be wrapped.aDecrypter- TheDecrypterto be applied to the bytes to be read.
-
-
Method Details
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
equals
-
hashCode
-
mark
public void mark(int aReadlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.refcodes.mixin.Disposable
-
toString
-