[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'base64' (#fcl)

TBase64EncodingStream

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

Base64 encoding stream.

Declaration

Source position: base64.pp line 33

type TBase64EncodingStream = class(TOwnerStream)

public

  destructor Destroy; override;

  

Remove a TBase64EncodingStream instance from memory

  function Flush;

  

Flush the remaining bytes to the output stream.

  function Write(); override;

  

Write data to the stream.

  function Seek(); override;

  

Position the stream

end;

Inheritance

TBase64EncodingStream

  

Base64 encoding stream.

|

TOwnerStream

|

TStream

|

TObject

Description

TBase64EncodingStream can be used to encode data using the base64 algorithm. At creation time, a destination stream is specified. Any data written to the TBase64EncodingStream instance will be base64 encoded, and subsequently written to the destination stream.

The TBase64EncodingStream stream is a write-only stream. Obviously it is also not seekable. It is meant to be included in a chain of streams.

By the nature of base64 encoding, when a buffer is written to the stream, the output stream does not yet contain all output: input must be a multiple of 3. In order to be sure that the output contains all encoded bytes, the Flush method can be used. The destructor will automatically call Flush, so all data is written to the destination stream when the decodes is destroyed.

See also

TBase64DecodingStream

  

Base64 Decoding stream


Documentation generated on: Sep 28 2017