Unit 'nullstream' Package
[Overview][Classes][Index] [#fcl]

TNullStream

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Empty data stream.

Declaration

Source position: nullstream.pp line 36

type TNullStream = class(THandleStream)

public

  function Read(); override;

  

Read null bytes from the stream.

  function Write(); override;

  

Write to stream.

  function Seek(); override;

  

Set current position in the stream.

  constructor Create;

  

Create a new instance.

end;

Inheritance

TNullStream

  

Empty data stream.

|

THandleStream

|

TStream

|

TObject

Description

TNullStream discards any data written to it (but keeps a virtual size) and returns 0 bytes when read from. It emulates a #rtl.classes.TMemoryStream: When writing to the stream, the size is increased as needed. When reading, the maximum number of returned bytes is limited to the size of the stream.

See also

TNullStream.Read

  

Read null bytes from the stream.

TNullStream.Write

  

Write to stream.

#rtl.classes.TStream.Size


Documentation generated on: Nov 22 2024