# Class: com.pnfsoftware.jeb.util.io.SubSeekableByteChannel

An seekable channel presenting a region \(view\) of another seekable channel. Only read\-operations are supported. Attempts to write or modify the master channel will raise an [IOException](IOException). The underlying channel [position](SeekableByteChannel#position()) is modified when bytes are read from a sub\-channel.

## Constructor: SubSeekableByteChannel
- parameter: `channel`, type: `java.nio.channels.SeekableByteChannel`
- parameter: `base`, type: `long`
- parameter: `size`, type: `long`

Description: Create a sub channel.
parameter: channel: the underlying channel
parameter: base: beginning of region
parameter: size: size of region
throws: if the underlying channel cannot be positioned to \`base\`

## Method: close

Description: Close this sub\-channel and its master channel.

## Method: isOpen
- return type: `boolean`


## Method: position
- return type: `long`


## Method: position
- parameter: `newPosition`, type: `long`
- return type: `java.nio.channels.SeekableByteChannel`


## Method: read
- parameter: `dst`, type: `java.nio.ByteBuffer`
- return type: `int`


## Method: size
- return type: `long`


## Method: truncate
- parameter: `size`, type: `long`
- return type: `java.nio.channels.SeekableByteChannel`


## Method: write
- parameter: `src`, type: `java.nio.ByteBuffer`
- return type: `int`


