Module org.cryptomator.cryptolib
Package org.cryptomator.cryptolib.common
Class EncryptingReadableByteChannel
- java.lang.Object
-
- org.cryptomator.cryptolib.common.EncryptingReadableByteChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel
public class EncryptingReadableByteChannel extends Object implements ReadableByteChannel
-
-
Constructor Summary
Constructors Constructor Description EncryptingReadableByteChannel(ReadableByteChannel src, Cryptor cryptor)Creates an EncryptingReadableByteChannel that encrypts a whole cleartext file beginning at its first byte.
-
-
-
Constructor Detail
-
EncryptingReadableByteChannel
public EncryptingReadableByteChannel(ReadableByteChannel src, Cryptor cryptor)
Creates an EncryptingReadableByteChannel that encrypts a whole cleartext file beginning at its first byte.- Parameters:
src- A cleartext channel positioned at its begincryptor- The cryptor to use
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Throws:
IOException
-
-