Class EncryptionStream
- java.lang.Object
-
- java.io.InputStream
-
- com.oracle.bmc.encryption.OciCryptoInputStream
-
- com.oracle.bmc.encryption.internal.EncryptionStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class EncryptionStream extends OciCryptoInputStream
-
-
Field Summary
-
Fields inherited from class com.oracle.bmc.encryption.OciCryptoInputStream
header
-
-
Constructor Summary
Constructors Constructor Description EncryptionStream(InputStream inputStream, Cipher cipher, EncryptionHeader header)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the CipherInputStream and InputStreamint
read(byte[] b)
Reads up to len bytes of data from the input stream into an array of bytes.-
Methods inherited from class com.oracle.bmc.encryption.OciCryptoInputStream
getContext, read
-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
EncryptionStream
public EncryptionStream(InputStream inputStream, Cipher cipher, EncryptionHeader header)
-
-
Method Detail
-
read
public int read(byte[] b) throws IOException
Reads up to len bytes of data from the input stream into an array of bytes.An attempt is made to read as many as len bytes, but a smaller number may be read. The number of bytes actually read is returned as an integer.
- Overrides:
read
in classInputStream
- Parameters:
b
- The buffer into which the data is read.- Returns:
- The total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
- Throws:
IOException
-
close
public void close() throws IOException
Close the CipherInputStream and InputStream- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
-