Package org.h2.store.fs.encrypt
Class FileEncrypt
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.store.fs.FileBaseDefault
org.h2.store.fs.encrypt.FileEncrypt
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,ReadableByteChannel,ScatteringByteChannel,SeekableByteChannel,WritableByteChannel
An encrypted file with a read cache.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileEncrypt(String name, byte[] encryptionKey, FileChannel base) FileEncrypt(String name, FileEncrypt source, FileChannel base) -
Method Summary
Modifier and TypeMethodDescriptionvoidforce(boolean metaData) protected voidprotected voidimplTruncate(long newSize) The truncate implementation.intread(ByteBuffer dst, long position) longsize()toString()tryLock(long position, long size, boolean shared) intwrite(ByteBuffer src, long position) Methods inherited from class org.h2.store.fs.FileBaseDefault
position, position, read, truncate, writeMethods inherited from class org.h2.store.fs.FileBase
lock, map, read, transferFrom, transferTo, writeMethods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
begin, close, end, isOpen
-
Field Details
-
BLOCK_SIZE
public static final int BLOCK_SIZEThe block size.- See Also:
-
-
Constructor Details
-
FileEncrypt
-
FileEncrypt
-
-
Method Details
-
implCloseChannel
- Overrides:
implCloseChannelin classFileBase- Throws:
IOException
-
read
- Overrides:
readin classFileBase- Throws:
IOException
-
write
- Overrides:
writein classFileBase- Throws:
IOException
-
size
- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileChannel- Throws:
IOException
-
implTruncate
Description copied from class:FileBaseDefaultThe truncate implementation.- Specified by:
implTruncatein classFileBaseDefault- Parameters:
newSize- the new size- Throws:
IOException- on failure
-
force
- Overrides:
forcein classFileBase- Throws:
IOException
-
tryLock
- Overrides:
tryLockin classFileBase- Throws:
IOException
-
toString
-