MultiReadOnlySeekableByteChannel

Read-Only Implementation of SeekableByteChannel that concatenates a collection of other SeekableByteChannels.

This is a lose port of MultiReadOnlySeekableByteChannel by Tim Underwood.

Since

1.19

Inheritors

Constructors

Link copied to clipboard
constructor(channels: List<SeekableByteChannel>)
Concatenates the given channels.

Functions

Link copied to clipboard
abstract fun close()

open fun close()
Closes an open channel.
Link copied to clipboard
Concatenates the given channels.
Link copied to clipboard
open fun isOpen(): Boolean
Returns true if this channel is open.
Link copied to clipboard
open fun position(): Long
Returns this channel's position.
open fun position(newPosition: Long): SeekableByteChannel
Sets the channel's position to newPosition.
open fun position(channelNumber: Long, relativeOffset: Long): SeekableByteChannel
set the position based on the given channel number and relative offset
Link copied to clipboard
open fun read(dst: ByteBuffer): Int
Reads bytes from this channel into the given buffer.
Link copied to clipboard
open fun size(): Long
Returns the size of the data source underlying this channel in bytes.
Link copied to clipboard
Link copied to clipboard
open fun write(src: ByteBuffer): Int