Class EncryptionInputStream
-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public class EncryptionInputStream extends FilterInputStreamThis class provides a wrapper for an InputStream that encrypts or decrypts the bytes as they are read.
-
-
Constructor Summary
Constructors Constructor Description EncryptionInputStream(InputStream in, boolean encrypt, Array<byte> encryptionKey)
-
Method Summary
Modifier and Type Method Description intread()intread(@NonNull() Array<byte> b)intread(@NonNull() Array<byte> b, int off, int len)longskip(long n)Unsupported. intavailable()voidclose()synchronized voidmark(int readlimit)Unsupported. synchronized voidreset()Unsupported. booleanmarkSupported()-
-
Constructor Detail
-
EncryptionInputStream
EncryptionInputStream(InputStream in, boolean encrypt, Array<byte> encryptionKey)
- Parameters:
in- The InputStream that will be encrypted/decrypted.encrypt- True means the InputStream will be encrypted.encryptionKey- The key which is used for encryption/decryption.
-
-
Method Detail
-
read
int read()
-
read
int read(@NonNull() Array<byte> b)
-
read
int read(@NonNull() Array<byte> b, int off, int len)
-
skip
long skip(long n)
Unsupported. This method will throw an UnsupportedOperationException.
- Parameters:
n- ignored- Returns:
This method will never return; it will always throw an UnsupportedOperationException.
-
available
int available()
-
close
void close()
-
mark
synchronized void mark(int readlimit)
Unsupported. This method will throw an UnsupportedOperationException.
- Parameters:
readlimit- ignored
-
reset
synchronized void reset()
Unsupported. This method will throw an UnsupportedOperationException.
-
markSupported
boolean markSupported()
-
-
-
-