Sign in Join
FPDoc Onlineexperiment

TProxyStream.Write function

Member of TProxyStreampublicIn unit Classes

Writes data from a buffer to the stream and returns the number of bytes written.

Declaration

pascal
function Write(const Buffer; Count: LongInt): LongInt; override

Description

Write attempts to write Count bytes from Buffer to the stream. It returns the actual number of bytes written to the stream.

This method should be used when the number of bytes that should be written is not determined. If a specific number of bytes should be written, use WriteBuffer instead.

As implemented in TStream, Write does nothing but raises EStreamError exception to indicate that writing is not supported. Descendant classes that allow writing must override this method to do the actual writing.

Descendant classes should (if they don't explicitly raise an exception) return a positive value (>=0), where zero indicates an error.

Errors

In case a descendant class does not allow writing to the stream, an exception is raised.

This description is the one of Classes.TStream.Write.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.