trait SliceableByteChannel extends SeekableByteChannel
IO abstraction used by this library. This extends the SeekableByteChannel with the ability to return a view of a slice of the channel. Additionally, this trait offers some convenience methods for reading byte arrays and other types.
- Alphabetic
- By Inheritance
- SliceableByteChannel
- SeekableByteChannel
- ByteChannel
- WritableByteChannel
- ReadableByteChannel
- Channel
- Closeable
- AutoCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def close(): Unit
- Definition Classes
- Channel → Closeable → AutoCloseable
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def isOpen(): Boolean
- Definition Classes
- Channel
- abstract def position(arg0: Long): SeekableByteChannel
- Definition Classes
- SeekableByteChannel
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def position(): Long
- Definition Classes
- SeekableByteChannel
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def read(arg0: ByteBuffer): Int
- Definition Classes
- SeekableByteChannel → ReadableByteChannel
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def size(): Long
- Definition Classes
- SeekableByteChannel
- Annotations
- @throws(classOf[java.io.IOException])
- abstract def slice(from: Long, to: Long): SliceableByteChannel
Return a view of this channel that is delimited by the given offsets.
Return a view of this channel that is delimited by the given offsets.
- from
the offset of the first byte of the slice (inclusive)
- to
the offset of the first byte after the slice (exclusive)
- returns
a view on the current channel
- abstract def write(arg0: ByteBuffer): Int
- Definition Classes
- SeekableByteChannel → WritableByteChannel
- Annotations
- @throws(classOf[java.io.IOException])
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def readBytes(offset: Long, length: Int): Array[Byte]
Read a block of bytes from the channel.
Read a block of bytes from the channel.
- Note
This method copies the bytes it reads. In order to avoid a copy you can use #slice.
- def readBytesFromEnd(offsetToEnd: Long, length: Int): Array[Byte]
Read a block of bytes from the end of the channel.
Read a block of bytes from the end of the channel.
- offsetToEnd
the number of bytes between the end of the block bytes and the end of the channel
- Note
This method copies the bytes it reads. In order to avoid a copy you can use #slice.
- def readIntFromEnd(offsetToEnd: Long): Int
Read an integer from the end of the channel (big-endian byte order).
Read an integer from the end of the channel (big-endian byte order).
- offsetToEnd
the number of bytes between the end of the integer bytes and the end of the channel
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def truncate(size: Long): SeekableByteChannel
Not supported by SliceableByteChannel.
Not supported by SliceableByteChannel.
- Definition Classes
- SliceableByteChannel → SeekableByteChannel
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()