Home Units Hierarchy Routines All identifiers

Class unaBitReader_stream

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaBitReader_stream = class(unaBitReader_abstract)

Description

Bit-reader based on streaming.

Hierarchy

Overview

Methods

Public constructor create();
Protected function EOF(numBits: unsigned = 8): bool; override;
Public procedure BeforeDestruction(); override;
Public procedure write(data: pointer; size: int);
Protected procedure doRestart(); override;
Protected procedure needMoreData(size: int); virtual;
Protected procedure readSubBuf(reqSize: int = -1; append: bool = false); override;

Description

Methods

Public constructor create();
 
Protected function EOF(numBits: unsigned = 8): bool; override;

Returns True if end of stream reached. Most streams may never ends, until closed.

Public procedure BeforeDestruction(); override;
 
Public procedure write(data: pointer; size: int);

Pushes new data into stream, making it available for parser.

Parameters
data
Data buffer.
size
Number of bytes pointed by data buffer.
Protected procedure doRestart(); override;

Cleans up the reader.

Protected procedure needMoreData(size: int); virtual;

Provides callback-like notification for streamer when more data is needed. Streamer must push some bytes using write() method.

Parameters
size
Number of bytes parser may expect to read. Streamer may provide more or less bytes.
Protected procedure readSubBuf(reqSize: int = -1; append: bool = false); override;

Reads next portion of data from stream.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09