ZipSplitReadOnlySeekableByteChannel

MultiReadOnlySeekableByteChannel that knows what a split ZIP archive should look like.

If you want to read a split archive using ZipFile then create an instance of this class from the parts of the archive.

Since

1.20

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
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
abstract 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
abstract fun read(buffer: 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

abstract fun truncate(size: Long): SeekableByteChannel
Truncates the data source underlying this channel to a given size.
Link copied to clipboard
open fun write(src: ByteBuffer): Int

abstract fun write(buffer: ByteBuffer): Int
Writes bytes from the given byte buffer to this channel.