ResourceStream¶
Qualified name: delphivcl.ResourceStream
- class ResourceStream¶
Bases:
CustomMemoryStream
TResourceStream 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
Read content as bytes.
Read content as float.
Read content as integer.
Read content as string.
Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application.
Write content as bytes.
Write content as float.
Write content as integer.
Write content as string.
Attributes
Capabilities
StreamCapabilities:
Returns the TObject.ClassName
Memory
Provides direct access to the memory pool allocated for the memory stream.
Position
Indicates the current offset into the stream for reading and writing.
Size
Indicates 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.