org.h2.store.fs

## Class FilePathEncrypt.FileEncrypt

- java.lang.Object
- - java.nio.channels.spi.AbstractInterruptibleChannel
  - - java.nio.channels.FileChannel
    - - org.h2.store.fs.FileBase
      - - org.h2.store.fs.FilePathEncrypt.FileEncrypt

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.ByteChannel, java.nio.channels.Channel, java.nio.channels.GatheringByteChannel, java.nio.channels.InterruptibleChannel, java.nio.channels.ReadableByteChannel, java.nio.channels.ScatteringByteChannel, java.nio.channels.SeekableByteChannel, java.nio.channels.WritableByteChannel

Enclosing class:
  FilePathEncrypt

    public static class FilePathEncrypt.FileEncrypt
    extends FileBase

An encrypted file with a read cache.

### Nested Class Summary

### Nested classes/interfaces inherited from class java.nio.channels.FileChannel

`java.nio.channels.FileChannel.MapMode`

### Constructor Summary

Constructors
Constructor and Description
`FilePathEncrypt.FileEncrypt(java.lang.String name, byte[] encryptionKey, java.nio.channels.FileChannel base)`

### Method Summary

Methods
`void` `force(boolean metaData)`
`protected void` `implCloseChannel()`
`long` `position()`
`java.nio.channels.FileChannel` `position(long newPosition)`
`int` `read(java.nio.ByteBuffer dst)`
`int` `read(java.nio.ByteBuffer dst, long position)`
`long` `size()`
`java.lang.String` `toString()`
`java.nio.channels.FileChannel` `truncate(long newSize)`
`java.nio.channels.FileLock` `tryLock(long position, long size, boolean shared)`
`int` `write(java.nio.ByteBuffer src)`
`int` `write(java.nio.ByteBuffer src, long position)`

### Methods inherited from class org.h2.store.fs.FileBase

`lock, map, read, transferFrom, transferTo, write`

### Methods inherited from class java.nio.channels.FileChannel

`lock, open, open, read, tryLock, write`

### Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel

`begin, close, end, isOpen`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.nio.channels.Channel

`close, isOpen`

### Constructor Detail

#### FilePathEncrypt.FileEncrypt

    public FilePathEncrypt.FileEncrypt(java.lang.String name,
                               byte[] encryptionKey,
                               java.nio.channels.FileChannel base)

### Method Detail

#### implCloseChannel

    protected void implCloseChannel()
                             throws java.io.IOException

Overrides:
  `implCloseChannel` in class `FileBase`
Throws:
  `java.io.IOException`

#### position

    public java.nio.channels.FileChannel position(long newPosition)
                                           throws java.io.IOException

Specified by:
  `position` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `position` in class `FileBase`
Throws:
  `java.io.IOException`

#### position

    public long position()
                  throws java.io.IOException

Specified by:
  `position` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `position` in class `FileBase`
Throws:
  `java.io.IOException`

#### read

    public int read(java.nio.ByteBuffer dst)
             throws java.io.IOException

Specified by:
  `read` in interface `java.nio.channels.ReadableByteChannel`
Specified by:
  `read` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `read` in class `FileBase`
Throws:
  `java.io.IOException`

#### read

    public int read(java.nio.ByteBuffer dst,
           long position)
             throws java.io.IOException

Overrides:
  `read` in class `FileBase`
Throws:
  `java.io.IOException`

#### write

    public int write(java.nio.ByteBuffer src,
            long position)
              throws java.io.IOException

Overrides:
  `write` in class `FileBase`
Throws:
  `java.io.IOException`

#### write

    public int write(java.nio.ByteBuffer src)
              throws java.io.IOException

Specified by:
  `write` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `write` in interface `java.nio.channels.WritableByteChannel`
Specified by:
  `write` in class `FileBase`
Throws:
  `java.io.IOException`

#### size

    public long size()
              throws java.io.IOException

Specified by:
  `size` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `size` in class `FileBase`
Throws:
  `java.io.IOException`

#### truncate

    public java.nio.channels.FileChannel truncate(long newSize)
                                           throws java.io.IOException

Specified by:
  `truncate` in interface `java.nio.channels.SeekableByteChannel`
Specified by:
  `truncate` in class `FileBase`
Throws:
  `java.io.IOException`

#### force

    public void force(boolean metaData)
               throws java.io.IOException

Overrides:
  `force` in class `FileBase`
Throws:
  `java.io.IOException`

#### tryLock

    public java.nio.channels.FileLock tryLock(long position,
                                     long size,
                                     boolean shared)
                                       throws java.io.IOException

Overrides:
  `tryLock` in class `FileBase`
Throws:
  `java.io.IOException`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`