Package org.h2.store.fs

# Class FileBaseDefault

java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.store.fs.FileBaseDefault

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`, `ByteChannel`, `Channel`, `GatheringByteChannel`, `InterruptibleChannel`, `ReadableByteChannel`, `ScatteringByteChannel`, `SeekableByteChannel`, `WritableByteChannel`

Direct Known Subclasses:
  `FileEncrypt`

public abstract class FileBaseDefault extends FileBase
Default implementation of the slow operations that need synchronization because they involve the file position.

## Nested Class Summary

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

`FileChannel.MapMode`

## Constructor Summary

Constructors
Constructor
Description
`FileBaseDefault()`

## Method Summary

Modifier and Type
Method
Description
`protected abstract void`
`implTruncate(long size)`
The truncate implementation.
`final long`
`position()`
`final FileChannel`
`position(long newPosition)`
`final int`
`read(ByteBuffer dst)`
`final FileChannel`
`truncate(long newLength)`
`final int`
`write(ByteBuffer src)`

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

`force, implCloseChannel, lock, map, read, read, transferFrom, transferTo, tryLock, write, write`

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

`lock, map, open, open, read, size, 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, toString, wait, wait, wait`

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

`isOpen`

## Constructor Details

### FileBaseDefault

public FileBaseDefault()

## Method Details

### position

public final long position() throws IOException

Specified by:
  `position` in interface `SeekableByteChannel`
Specified by:
  `position` in class `FileChannel`
Throws:
  `IOException`

### position

public final FileChannel position(long newPosition) throws IOException

Specified by:
  `position` in interface `SeekableByteChannel`
Specified by:
  `position` in class `FileChannel`
Throws:
  `IOException`

### read

public final int read(ByteBuffer dst) throws IOException

Specified by:
  `read` in interface `ReadableByteChannel`
Specified by:
  `read` in interface `SeekableByteChannel`
Specified by:
  `read` in class `FileChannel`
Throws:
  `IOException`

### write

public final int write(ByteBuffer src) throws IOException

Specified by:
  `write` in interface `SeekableByteChannel`
Specified by:
  `write` in interface `WritableByteChannel`
Specified by:
  `write` in class `FileChannel`
Throws:
  `IOException`

### truncate

public final FileChannel truncate(long newLength) throws IOException

Specified by:
  `truncate` in interface `SeekableByteChannel`
Specified by:
  `truncate` in class `FileChannel`
Throws:
  `IOException`

### implTruncate

protected abstract void implTruncate(long size) throws IOException
The truncate implementation.

Parameters:
  `size` - the new size
Throws:
  `IOException` - on failure