Readium
Toggle table of contents
androidJvm
Target filter
androidJvm
Switch theme
Search in API
Skip to content
Readium
readium-shared
/
org.readium.r2.shared.util.zip
/
FileChannelAdapter
File
Channel
Adapter
open
class
FileChannelAdapter
:
SeekableByteChannel
Members
Functions
close
Link copied to clipboard
abstract
fun
close
(
)
open
fun
close
(
)
Closes an open channel.
is
Open
Link copied to clipboard
open
fun
isOpen
(
)
:
Boolean
Returns true if this channel is open.
position
Link copied to clipboard
open
fun
position
(
)
:
Long
Returns the current position as a positive number of bytes from the start of the underlying data source.
open
fun
position
(
newPosition
:
Long
)
:
SeekableByteChannel
Sets the channel's position to
newPosition
.
read
Link copied to clipboard
open
fun
read
(
dst
:
ByteBuffer
)
:
Int
Reads bytes from this channel into the given buffer.
size
Link copied to clipboard
open
fun
size
(
)
:
Long
Returns the size of the data source underlying this channel in bytes.
truncate
Link copied to clipboard
open
fun
truncate
(
size
:
Long
)
:
SeekableByteChannel
Truncates the data source underlying this channel to a given size.
write
Link copied to clipboard
open
fun
write
(
src
:
ByteBuffer
)
:
Int
Writes bytes from the given byte buffer to this channel.