ResourceStream¶
Qualified name: delphivcl.ResourceStream
- class ResourceStream¶
Bases:
CustomMemoryStreamTResourceStream is a memory stream that provides access to the compiled resources in an application. Use TResourceStream to read the resources of an application. An instance of TResourceStream holds the value of a single resource in a memory buffer where it is accessible to the application. The global ReadComponentRes function uses TResourceStream to access the compiled resources used by the application.
Methods
TPyDelphiStream.ReadBytes() Read content as bytes.
TPyDelphiStream.ReadFloat() Read content as float.
TPyDelphiStream.ReadInt() Read content as integer.
TPyDelphiStream.ReadString() Read content as string.
TResourceStream.Write(Buffer, Count: int) -> int Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application.
TPyDelphiStream.WriteBytes() Write content as bytes.
TPyDelphiStream.WriteFloat() Write content as float.
TPyDelphiStream.WriteInt() Write content as integer.
TPyDelphiStream.WriteString() Write content as string.
Attributes
CapabilitiesStreamCapabilities:
Returns the TObject.ClassName
MemoryProvides direct access to the memory pool allocated for the memory stream.
PositionIndicates the current offset into the stream for reading and writing.
SizeIndicates the size in bytes of the stream.
- ClassName¶
Returns the TObject.ClassName
- ReadBytes()¶
Read content as bytes.
- ReadFloat()¶
Read content as float.
- ReadInt()¶
Read content as integer.
- ReadString()¶
Read content as string.
- Write(Buffer, Count: int) int¶
Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application. Applications should not use a TResourceStream to write the resources of the running application. Write overrides the inherited method to raise an EStreamError exception when an application tries to write to the application’s resources. As all other data-writing methods of TResourceStream (WriteBuffer, WriteComponent) call Write to do the actual writing, calling any of the data-writing methods of TResourceStream will raise an exception.
- WriteBytes()¶
Write content as bytes.
- WriteFloat()¶
Write content as float.
- WriteInt()¶
Write content as integer.
- WriteString()¶
Write content as string.