help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'Classes' (#rtl)

THandleStream

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

Base class for streams that are identified by an OS handle.

Declaration

Source position: classesh.inc line 649

type THandleStream = class(TStream)

public

  constructor Create();

  

Create a handlestream from an OS Handle.

  function Read(); override;

  

Overrides standard read method.

  function Write(); override;

  

Overrides standard write method.

  function Seek(); override;

  

Overrides the Seek method.

  property Handle: Integer; [r]

  

The OS handle of the stream.

end;

Inheritance

THandleStream

  

Base class for streams that are identified by an OS handle.

|

TStream

  

Base class for streams.

|

TObject

Description

THandleStream is an abstract descendent of the TStream class that provides methods for a stream to handle all reading and writing to and from a handle, provided by the underlying OS. To this end, it overrides the Read and Write methods of TStream.

Remark:
  • ThandleStream does not obtain a handle from the OS by itself, it just handles reading and writing to such a handle by wrapping the system calls for reading and writing; Descendent classes should obtain a handle from the OS by themselves and pass it on in the inherited constructor.
  • Contrary to Delphi, no seek is implemented for THandleStream, since pipes and sockets do not support this. The seek is implemented in descendent methods that support it.

See also

TStream

  

Base class for streams.

TFileStream

  

Stream that stores its data in a named file on disk.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505