Sign in Join
FPDoc Onlineexperiment

TStream class

In unit Classes

Base class for streams.

Declaration

pascal
TStream = class(TObject)

Inheritance

  1. TStream
  2. TObject

Descends from it: TBufBlobStream TCachedDataStream TCustomMemoryStream TDosStream TGZFileStream TGZipCompressionStream TGZipDecompressionStream THandleStream TMemoryStream TOwnerStream TProxyAggregateStream TProxyStream TResourceDataStream

Description

TStream is the base class for all streaming classes. It defines methods for reading, writing from and to streams, as well as functions to determine the size of the stream as well as the current position of the stream.

Descendant classes such as TMemoryStream or TFileStream then override these methods to write streams to memory or file.

See also

Properties

PositionpublicThe current position in the stream.
SizepublicThe current size of the stream.

Methods

InvalidSeekprotected
Discardprotected
DiscardLargeprotected
FakeSeekForwardprotected
GetPositionprotected
SetPositionprotected
GetSizeprotected
SetSize64protected
SetSizeprotectedSets the size of the stream.
ReadNotImplementedprotected
WriteNotImplementedprotected
ReadMaxSizeDataprotected
ReadExactSizeDataprotected
WriteMaxSizeDataprotected
WriteExactSizeDataprotected
ReadpublicReads data from the stream to a buffer and returns the number of bytes read.
Read64public
WritepublicWrites data from a buffer to the stream and returns the number of bytes written.
Write64public
SeekpublicSets the current position in the stream.
ReadDatapublic
ReadBufferpublicReads data from the stream to a buffer.
ReadBufferDatapublic
WriteBufferpublicWrites data from a buffer to the stream.
WriteDatapublic
WriteBufferDatapublic
CopyFrompublicCopy data from one stream to another.
ReadComponentpublicReads component data from a stream.
ReadComponentRespublicReads component data and resource header from a stream.
WriteComponentpublicWrite component data to the stream.
WriteComponentRespublicWrite resource header and component data to a stream.
WriteDescendentpublicWrite descendent of a component.
WriteDescendentRespublicWrite descendent of a component as resource.
WriteResourceHeaderpublicWrite resource header to the stream.
FixupResourceHeaderpublicNot implemented in FPC.
ReadResHeaderpublicRead a resource header from the stream.
ReadBytepublicRead a byte from the stream and return its value.
ReadWordpublicRead a word from the stream and return its value.
ReadDWordpublicRead a DWord from the stream and return its value.
ReadQWordpublicRead a QWord value from the stream and return its value.
ReadAnsiStringpublicRead an ansistring from the stream and return its value.
ReadUnicodeStringpublic
WriteBytepublicWrite a byte to the stream.
WriteWordpublicWrite a word to the stream.
WriteDWordpublicWrite a DWord to the stream.
WriteQWordpublicWrite a QWord value to the stream.
WriteAnsiStringpublicWrite an ansistring to the stream.
WriteUnicodeStringpublic

Types and constants

DefaultWriteUnitnamepublic

Inherited

From TObject (42)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance Create DefaultHandler DefaultHandlerStr Destroy 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.