Sign in Join
FPDoc Onlineexperiment

TStringStream class

In unit Classes

Stream that stores its data in a string.

Declaration

pascal
TStringStream = class(TBytesStream)

Inheritance

  1. TStringStream
  2. TBytesStream
  3. TMemoryStream
  4. TCustomMemoryStream
  5. TStream
  6. TObject

Description

TStringStream stores its data in an ansistring. The contents of this string is available as the DataString property. It also introduces some methods to read or write parts of the stringstream's data as a string.

The main purpose of a TStringSTream is to be able to treat a string as a stream from which can be read.

See also

Properties

DataStringpublicContains the contents of the stream in string form.
AnsiDataStringpublic
UnicodeDataStringpublicDatastring as unicode string.
OwnsEncodingpublicDoes the stream instance owns the encoding.
EncodingpublicEncoding of the string with the data.

Methods

CreatepublicCreates a new stringstream and sets its initial content.
CreateRawpublicCreate stringstream using codepage of string.
DestroypublicFree the instance of the stream.
ReadUnicodeStringpublicRead a unicode string from the stream.
WriteUnicodeStringpublicWrite a unicode string to the stream.
ReadAnsiStringpublicRead an ansistring from the stream.
WriteAnsiStringpublicWrite an ansistring to the stream.
ReadStringpublicReads a string of length Count.
WriteStringpublicWriteString writes a string to the stream.

Inherited

From TBytesStream (2)

Bytes Realloc

From TMemoryStream (6)

Capacity Clear LoadFromFile LoadFromStream SetSize Write

From TCustomMemoryStream (9)

GetPosition GetSize Memory Read SaveToFile SaveToStream Seek SetPointer SizeBoundsSeek

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

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