Download Now

    Reference TBufferStream

    Declared in Codebot.Text.pas on line 108

    TBufferStream can be used to convert a buffer to a stream
      TBufferStream = class(TStream)
      public
        { Create a new buffer stream given a buffer }
        constructor Create(Buffer: TBuffer);
        { Read bytes from the buffer }
        function Read(var Buffer; Count: LongInt): LongInt; override;
        { Write bytes to the buffer growing it if needed }
        function Write(const Buffer; Count: LongInt): LongInt; override;
        { Move the stream position }
        function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;
        { Save the buffer contents to another stream }
        procedure SaveToStream(Stream: TStream);
        { Save the buffer contents to a file }
        procedure SaveToFile(const FileName: string);
      end;

    See also