FileReadPlan

cc.otavia.core.channel.message.FileReadPlan
case class FileReadPlan(length: Int, position: Long) extends ReadPlan

Read file channel from position with length, See also FileChannel.

Value parameters

length

Length of bytes want to read. If length is -1, read until file end.

position

If position is -1, bytes are read starting at this channel's current file position, and then the file position is updated with the number of bytes actually read. If position is not -1, then read starting at the given file position rather than at the channel's current position. This method does not modify this channel's position. If the given position is greater than the file's current size then no bytes are read.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait ReadPlan
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def estimatedNextSize: Int

Guess the capacity for the next receive buffer size that is probably large enough to read all inbound data and small enough not to waste its space.

Guess the capacity for the next receive buffer size that is probably large enough to read all inbound data and small enough not to waste its space.

Attributes

Definition Classes
override def lastRead(attemptedBytesRead: Int, actualBytesRead: Int, numMessagesRead: Int): Boolean

Notify the ReadPlan of the last read operation and its result.

Notify the ReadPlan of the last read operation and its result.

Value parameters

actualBytesRead

The number of bytes from the previous read operation. This may be negative if a read error occurs.

attemptedBytesRead

The number of bytes the read operation did attempt to read.

numMessagesRead

The number of messages read.

Attributes

Returns

true if the read loop should continue reading, false otherwise.

Definition Classes
override def readComplete(): Unit

Method that must be called once the read loop was completed.

Method that must be called once the read loop was completed.

Attributes

Definition Classes

Inherited methods

def continueReading: Boolean

Attributes

Inherited from:
ReadPlan
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product