TOutputStream

A stream of bytes that can be written from front to end.

Inheritance

LevelAncestorDescription
1TObjectUltimate ancestor in a class hierarchy
2TOutputStream

Source

Stream.Output.pas (29)

Description

Streams can implement buffering schemes to allow clustering of data that has been written by separate calls to Write. Flush forces buffered data to be written to its final destination and should be called at least once after all necessary data has been written and the stream can be freed. No implicit call to Flush is executed on freeing a stream and unflushed data may be lost.

When encoding multi-byte simple values the order of the constituting bytes can either be big endian (higher order bytes first) or little endian (lower order bytes first). TOutputStream provides functions to write simple values using either big or little endian encoding. These functions work correctly regardless of the endianness of the underlying platform.

Fields

ScopeVisibilityTypeNameDescription
Typeprivatearray of TPositiveInteger8Zeros

Methods

ScopeVisibilityResultNameDescription
InstancepublicWrite(Buffer; Count: TPositiveInteger32)Writes Count bytes from Buffer to the stream.
InstancepublicWriteZeros(Count: TPositiveInteger32)
InstancepublicFlush()
InstancepublicWriteLittleEndian8(Value: TPositiveInteger8)
InstancepublicWriteLittleEndian16(Value: TPositiveInteger16)
InstancepublicWriteLittleEndian24(Value: TPositiveInteger32)
InstancepublicWriteLittleEndian32(Value: TPositiveInteger32)
InstancepublicWriteLittleEndian64(Value: TPositiveInteger64)
InstancepublicWriteLittleEndianFloatingPoint32(Value: TFloatingPoint32)
InstancepublicWriteLittleEndianFloatingPoint64(Value: TFloatingPoint64)
InstancepublicWriteBigEndian8(Value: TPositiveInteger8)
InstancepublicWriteBigEndian16(Value: TPositiveInteger16)
InstancepublicWriteBigEndian24(Value: TPositiveInteger32)
InstancepublicWriteBigEndian32(Value: TPositiveInteger32)
InstancepublicWriteBigEndian64(Value: TPositiveInteger64)
InstancepublicWriteBigEndianFloatingPoint32(Value: TFloatingPoint32)
InstancepublicWriteBigEndianFloatingPoint64(Value: TFloatingPoint64)
GlobalpublicCreate()