Thema: Delphi Array base64 codieren

Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#4

Re: Array base64 codieren

  Alt 19. Feb 2009, 10:53
Hallo,

ein Array in ein Stream zu kopieren sollte
sich mit TMemoryStream.WriteBuffer bewerkstelligen lassen.

Zitat von DelphiHilfe:
procedure WriteBuffer(const Buffer; Count: Longint);

Description

Use WriteBuffer to save data to a stream. WriteBuffer and ReadBuffer are used in cases where the number of bytes is known and required, for example when reading in structures. Use WriteBuffer for standard file I/O streaming.

WriteBuffer is used internally for writing to a stream and copying from a stream. It is used by other objects, such as strings and lists, for writing strings stored in a buffer.

WriteBuffer calls Write to handle the actual writing. If the stream fails to write all the requested bytes, an EWriteError exception is raised.
MemStream.WriteBuffer(Array[0],High(Array)) Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat