BufferDataStreamBase

Description

abstract class Tinman.Core.IO.Streams.BufferDataStreamBase

Derived from

DataStreamBase abstract

Abstract base class for IDataStream implementations that use a memory buffer for increasing I/O performance.

Protected / Constructors

Buffer​Data​Stream​Base


protected constructor BufferDataStreamBase → (3)

bufferSize in : int32

The buffer size, in bytes.

initialPosition in : int64

The initial stream position.

initialLength in : int64

The initial stream length.

Creates a new instance of BufferDataStreamBase.

Protected / Methods

Do​Read


protected abstract method DoRead → (2)

position in : int64

The stream position to start reading at.

buffer in : ByteBuffer

The output buffer.

returns → int64

The number of read bytes.

Reads a number of bytes.

IOException

If an I/O error has occurred.

Do​Write


protected abstract method DoWrite → (2)

position in : int64

The stream position to start writing at.

buffer in : ByteBuffer

The input buffer.

Writes a number of bytes.

IOException

If an I/O error has occurred.

Protected / Attributes

Shall​Flush


protected attribute ShallFlush → (get)

value : bool

true if data will be flushed, false if not.

Checks if the stream has any buffered data to write upon next flush.