Download Now

    Reference TNullStream

    Declared in Codebot.System.pas on line 1113

    TNullStream does nothing other than records bytes read or written per second
      TNullStream = class(TStream)
      public
        { Create a new null stream }
        constructor Create;
        { Destroy the null stream and its read and write info }
        destructor Destroy; override;
        { Ignores buffer and records count read bytes Remarks If two seconds or more
          have passed since the last read the null stream will automatically reset
          its read info }
        function Read(var Buffer; Count: Longint): Longint; override;
        { Ignores buffer and records count written bytes Remarks If two seconds or
          more have passed since the last write the null stream will automatically
          reset its write info }
        function Write(const Buffer; Count: Longint): Longint; override;
        { Does nothing and returns zero }
        function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
        { A log of read information }
        property ReadInfo: TNullInfo read FReadInfo;
        { A log of write information }
        property WriteInfo: TNullInfo read FWriteInfo;
      end;

    See also