BytesStream#
Qualified name: delphivcl.BytesStream
- class BytesStream#
Bases:
MemoryStream
TBytesStream is a stream that stores its data in bytes. Use TBytesStream to store data as bytes in a memory buffer. Memory streams are useful as intermediary objects that can hold information as well as read it from or write it to another storage medium. They provide a useful format for comparing the contents of streams, or for manipulating data that is stored in a less accessible medium.
Methods
Constructs an object and initializes its data before the object is first used.
Frees the Wrapped Delphi Object
Returns True if Delphi Object is or inherits from ClassName
Read content as bytes.
Read content as float.
Read content as integer.
Read content as string.
Sets several properties in one call
If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.
If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.
Write content as bytes.
Write content as float.
Write content as integer.
Write content as string.
Attributes
Specifies the stored data.
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.
- Bytes#
Specifies the stored data. The Bytes property returns the buffer in which the data is stored. Use the Size property to find the actual amount of data in the buffer.
- ClassName#
Returns the TObject.ClassName
- Create(ABytes: Array<System.Byte>)#
Constructs an object and initializes its data before the object is first used. System.Classes.TBytesStream.Create inherits from System.TObject.Create. All content below this line refers to System.TObject.Create. Constructs an object and initializes its data before the object is first used. Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create constructor defined by TObject allocates memory but does not initialize data. Descendant objects usually define a constructor that creates the particular kind of object and initializes its data.
Note: If an exception escapes from a constructor, the object’s destructor is called to clean up the failed instance.
- Free()#
Frees the Wrapped Delphi Object
- InheritsFrom(ClassName)#
Returns True if Delphi Object is or inherits from ClassName
- ReadBytes()#
Read content as bytes.
- ReadFloat()#
Read content as float.
- ReadInt()#
Read content as integer.
- ReadString()#
Read content as string.
- SetProps(prop1=val1, prop2=val2...)#
Sets several properties in one call
- ToList()#
If the object is a container (TStrings, TComponent…), it returns the content of the sequence as a Python list object.
- ToTuple()#
If the object is a container (TStrings, TComponent…), it returns the content of the sequence as a Python tuple object.
- WriteBytes()#
Write content as bytes.
- WriteFloat()#
Write content as float.
- WriteInt()#
Write content as integer.
- WriteString()#
Write content as string.