final class AsynchronousFileChannel extends Channel
- Alphabetic
- By Inheritance
- AsynchronousFileChannel
- Channel
- IOCloseable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AsynchronousFileChannel(channel: java.nio.channels.AsynchronousFileChannel)
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
- val channel: java.nio.channels.AsynchronousFileChannel
- Attributes
- protected
- Definition Classes
- AsynchronousFileChannel → Channel
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def close: IO[IOException, Unit]
Closes this channel.
Closes this channel.
- Definition Classes
- Channel → IOCloseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def force(metaData: Boolean): IO[IOException, Unit]
- 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 isOpen: UIO[Boolean]
Tells whether or not this channel is open.
Tells whether or not this channel is open.
- Definition Classes
- Channel
- def lock(position: Long = 0L, size: Long = Long.MaxValue, shared: Boolean = false): IO[IOException, FileLock]
- 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 read(dst: ByteBuffer, position: Long): IO[IOException, Int]
Reads data from this channel into buffer, returning the number of bytes read.
Reads data from this channel into buffer, returning the number of bytes read.
Fails with
java.io.EOFExceptionif end-of-stream is reached.- position
The file position at which the transfer is to begin; must be non-negative
- def readChunk(capacity: Int, position: Long): IO[IOException, Chunk[Byte]]
Reads data from this channel as a
Chunk.Reads data from this channel as a
Chunk.Fails with
java.io.EOFExceptionif end-of-stream is reached.- position
The file position at which the transfer is to begin; must be non-negative
- def sink(position: Long, bufferConstruct: UIO[ByteBuffer] = Buffer.byte(5000)): ZSink[Clock, IOException, Byte, Byte, Long]
A sink that will write all the bytes it receives to this channel.
A sink that will write all the bytes it receives to this channel. The sink's result is the number of bytes written.
- position
The position in the file the sink will write to.
- bufferConstruct
Optional, overrides how to construct the buffer used to transfer bytes received by the sink to this channel. By default a heap buffer is used, but a direct buffer will usually perform better.
- def size: IO[IOException, Long]
- def stream(position: Long, bufferConstruct: UIO[ByteBuffer] = Buffer.byte(5000)): Stream[IOException, Byte]
A
ZStreamthat reads from this channel.A
ZStreamthat reads from this channel.The stream terminates without error if the channel reaches end-of-stream.
- position
The position in the file the stream will read from.
- bufferConstruct
Optional, overrides how to construct the buffer used to transfer bytes read from this channel into the stream. By default a heap buffer is used, but a direct buffer will usually perform better.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def truncate(size: Long): IO[IOException, Unit]
- def tryLock(position: Long = 0L, size: Long = Long.MaxValue, shared: Boolean = false): IO[IOException, FileLock]
- 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()
- def write(src: ByteBuffer, position: Long): IO[IOException, Int]
- def writeChunk(src: Chunk[Byte], position: Long): IO[IOException, Unit]
Writes a chunk of bytes at a specified position in the file.
Writes a chunk of bytes at a specified position in the file.
More than one write operation may be performed to write the entire chunk.
- src
The bytes to write.
- position
Where in the file to write.