Skip to content

Latest commit

 

History

History
36 lines (20 loc) · 1.08 KB

TPJStreamWrapper-Write.md

File metadata and controls

36 lines (20 loc) · 1.08 KB

Write method

Project: Stream Extension Classes

Unit: PJStreamWrapper

Class: TPJStreamWrapper

Applies to: ~>3.0

function Write(const Buffer; Count: Longint): Longint; override;

Description

This method overrides and implements an abstract method of TStream.

Write attempts to write a specified number of bytes of data from a buffer into the wrapped stream.

Parameters:

  • Buffer -- Untyped variable containing the data to be written to the stream. The data passed to this parameter must have size of a least Count bytes.
  • Count -- Number of bytes to be written from Buffer into the wrapped stream.

Returns:

  • Number of bytes actually written.

Remarks

If the method's return value is less than Count then not all the data could be written to the wrapped stream.

Data is written to the wrapped stream from its current position. The stream's position is incremented by the number of bytes written.

An exception may be raised if the wrapped stream does not support write access.