TSdlIOStream
The read/write operation structure.
Definition
Unit: Neslib.Sdl3.IO
Properties
Name | Description |
---|---|
Properties | The properties associated with this stream. |
Size | The size of the data stream. |
Status | The status of the stream. |
Constructors
Name | Description |
---|---|
Create(TSdlIOStreamInterface, Pointer) | Create a custom I/O stream. |
Create(Pointer, NativeInt, Boolean) | Create an I/O stream from a read-write memory buffer. |
Create(String, String) | Creates an I/O stream for reading from and/or writing to a named file. |
Operators
Name | Description |
---|---|
Equal(TSdlIOStream, TSdlIOStream) | Used to compare against another TSdlIOStream. |
Equal(TSdlIOStream, Pointer) | Used to compare against nil . |
Implicit | Used to set the value to nil . |
NotEqual(TSdlIOStream, TSdlIOStream) | Used to compare against another TSdlIOStream. |
NotEqual(TSdlIOStream, Pointer) | Used to compare against nil . |
Methods
Name | Description |
---|---|
Create | Creates an I/O stream that is backed by dynamically allocated memory. |
Flush | Flush any buffered data in the stream. |
Free | Close and free the I/O stream. |
Load(Boolean) | Load all the data from the stream. |
Load(NativeInt, Boolean) | Load all the data from the stream. |
Read | Read from the stream. |
ReadS16BE | Read a signed 16-bit big-endian integer from the stream. |
ReadS16LE | Read a signed 16-bit little-endian integer from the stream. |
ReadS32BE | Read a signed 32-bit big-endian integer from the stream. |
ReadS32LE | Read a signed 32-bit little-endian integer from the stream. |
ReadS64BE | Read a signed 64-bit big-endian integer from the stream. |
ReadS64LE | Read a signed 64-bit little-endian integer from the stream. |
ReadS8 | Read a signed byte from the stream. |
ReadU16BE | Read an unsigned 16-bit big-endian integer from the stream. |
ReadU16LE | Read an unsigned 16-bit little-endian integer from the stream. |
ReadU32BE | Read an unsigned 32-bit big-endian integer from the stream. |
ReadU32LE | Read an unsigned 32-bit little-endian integer from the stream. |
ReadU64BE | Read an unsigned 64-bit big-endian integer from the stream. |
ReadU64LE | Read an unsigned 64-bit little-endian integer from the stream. |
ReadU8 | Read an unsigned byte from the stream. |
Save | Save all the data into the stream. |
Seek | Seek within the data stream. |
Tell | Determine the current read/write offset in the data stream. |
Write | Write to the stream. |
WriteS16BE | Write a signed 16-bit integer to the stream as big-endian data. |
WriteS16LE | Write a signed 16-bit integer to the stream as little-endian data. |
WriteS32BE | Write a signed 32-bit integer to the stream as big-endian data. |
WriteS32LE | Write a signed 32-bit integer to the stream as little-endian data. |
WriteS64BE | Write a signed 64-bit integer to the stream as big-endian data. |
WriteS64LE | Write a signed 64-bit integer to the stream as little-endian data. |
WriteS8 | Write a signed byte to the stream. |
WriteU16BE | Write an unsigned 16-bit integer to the stream as big-endian data. |
WriteU16LE | Write an unsigned 16-bit integer to the stream as little-endian data. |
WriteU32BE | Write an unsigned 32-bit integer to the stream as big-endian data. |
WriteU32LE | Write an unsigned 32-bit integer to the stream as little-endian data. |
WriteU64BE | Write an unsigned 64-bit integer to the stream as big-endian data. |
WriteU64LE | Write an unsigned 64-bit integer to the stream as little-endian data. |
WriteU8 | Write an unsigned byte to the stream. |
Property Descriptions
Properties
The properties associated with this stream.
property Properties: TSdlProperties read GetProperties
Type: TSdlProperties
Exceptions
ESdlError
: Raised on failure.
Remarks
This property is not thread safe.
Size
The size of the data stream.
property Size: Int64 read GetSize
Type: Int64
Exceptions
ESdlError
: Raised on failure.
Remarks
This function is not thread safe.
Status
The status of the stream.
This information can be useful to decide if a short read or write was due to an error, an EOF, or a non-blocking operation that isn't yet ready to complete.
The status is only expected to change after a Read or Write call; don't expect it to change if you just read this property in a tight loop.
property Status: TSdlIOStatus read GetStatus
Type: TSdlIOStatus
Remarks
This property is not thread safe.
Constructor Descriptions
Create
Create a custom I/O stream.
Applications do not need to use this constructor unless they are providing their own TSdlIOStream implementation. If you just need a TSdlIOStream to read/write a common data source, you should use the built-in implementations in SDL, by using the other constructors.
constructor Create(const AInterface: TSdlIOStreamInterface; const AUserData: Pointer); overload
Parameters
AInterface
: TSdlIOStreamInterface
: The interface that implements this TSdlIOStream, initialized by calling its Init method.
AUserData
: Pointer
: The pointer that will be passed to the interface functions.
Exceptions
ESdlError
: Raised on failure.
See Also
Remarks
It is safe to call this method from any thread
Create
Create an I/O stream from a read-write memory buffer.
This function sets up this record based on a memory area of a certain size, for both read and write access.
This memory buffer is not copied by the TSdlIOStream; the pointer you provide must remain valid until you close the stream. Closing the stream will not free the original buffer.
If you need to make sure the TSdlIOStream never writes to the memory buffer, you should set AReadOnly to True.
The following properties will be set at creation time by SDL:
TSdlProperty.IOStreamMemory
: this will be theAMem
parameter that was passed to this constructor.TSdlProperty.IOStreamMemorySize
: this will be theASize
parameter that was passed to this constructor.
constructor Create(const AMem: Pointer; const ASize: NativeInt; const AReadOnly: Boolean = False); overload
Parameters
AMem
: Pointer
: A pointer to a buffer to feed an TSdlIOStream stream.
ASize
: NativeInt
: The buffer size, in bytes.
AReadOnly
: Boolean = False
: (Optional) to disallow writing to this stream. Default to False (that is, you can read and write to this stream).
Exceptions
ESdlError
: Raised on failure.
See Also
Remarks
It is safe to call this method from any thread
Create
Creates an I/O stream for reading from and/or writing to a named file.
The AMode
string is treated roughly the same as in a call to the C library's fopen, even if SDL doesn't happen to use fopen behind the scenes.
Available AMode
strings:
- 'r': Open a file for reading. The file must exist.
- 'w': Create an empty file for writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.
- 'a': Append to a file. Writing operations append data at the end of the file. The file is created if it does not exist.
- 'r+': Open a file for update both reading and writing. The file must exist.
- 'w+': Create an empty file for both reading and writing. If a file with the same name already exists its content is erased and the file is treated as a new empty file.
- 'a+': Open a file for reading and appending. All writing operations are performed at the end of the file, protecting the previous content to be overwritten. You can reposition (fseek, rewind) the internal pointer to anywhere in the file for reading, but writing operations will move it back to the end of file. The file is created if it does not exist.
NOTE: In order to open a file as a binary file, a 'b' character has to be included in the AMode
string. This additional 'b' character can either be appended at the end of the string (thus making the following compound modes: 'rb', 'wb', 'ab', 'r+b', 'w+b', 'a+b') or be inserted between the letter and the '+' sign for the mixed modes ('rb+', 'wb+', 'ab+'). Additional characters may follow the sequence, although they should have no effect. For example, 't' is sometimes appended to make explicit the file is a text file.
In Android, this constructor can be used to open content:// URIs. As a fallback, this constructor will transparently open a matching filename in the app's assets
.
Freeing the I/O stream will close SDL's internal file handle.
The following properties may be set at creation time by SDL:
TSdlProperty.IOStreamWindowHandle
: a pointer, that can be cast to a THandle, that this TSdlIOStream is using to access the filesystem. If the program isn't running on Windows, or SDL used some other method to access the filesystem, this property will not be set.TSdlProperty.IOStreamFileDescriptor
: a file descriptor that this TSdlIOStream is using to access the filesystem.TSdlProperty.IOStreamAndroidAAsset
: a pointer, that can be cast to an Android NDKAAsset
, that this TSdlIOStream is using to access the filesystem. If SDL used some other method to access the filesystem, this property will not be set.
constructor Create(const AFilename, AMode: String); overload
Parameters
AFilename
: String
: The filename to open.
AMode
: String
: A string representing the mode to be used for opening the file.
Exceptions
ESdlError
: Raised on failure.
See Also
Remarks
This function is not thread safe.
Operator Descriptions
Equal(TSdlIOStream, TSdlIOStream)
Used to compare against another TSdlIOStream.
class operator Equal(const ALeft, ARight: TSdlIOStream): Boolean; inline; static
Parameters
ALeft
: TSdlIOStream
ARight
: TSdlIOStream
Returns
Boolean
Equal(TSdlIOStream, Pointer)
Used to compare against nil
.
class operator Equal(const ALeft: TSdlIOStream; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlIOStream
ARight
: Pointer
Returns
Boolean
Implicit(Pointer)
Used to set the value to nil
.
class operator Implicit(const AValue: Pointer): TSdlIOStream; inline; static
Parameters
AValue
: Pointer
Returns
NotEqual(TSdlIOStream, TSdlIOStream)
Used to compare against another TSdlIOStream.
class operator NotEqual(const ALeft, ARight: TSdlIOStream): Boolean; inline; static
Parameters
ALeft
: TSdlIOStream
ARight
: TSdlIOStream
Returns
Boolean
NotEqual(TSdlIOStream, Pointer)
Used to compare against nil
.
class operator NotEqual(const ALeft: TSdlIOStream; const ARight: Pointer): Boolean; inline; static
Parameters
ALeft
: TSdlIOStream
ARight
: Pointer
Returns
Boolean
Method Descriptions
Create
Creates an I/O stream that is backed by dynamically allocated memory.
This supports the following properties to provide access to the memory and control over allocations:
TSdlProperty.IOStreamDynamicMemory
: a pointer to the internal memory of the stream. This can be set to nil to transfer ownership of the memory to the application, which should free the memory with SdlFree. If this is done, the next operation on the stream must be Free.TSdlProperty.IOStreamDynamicChunkSize
: memory will be allocated in multiples of this size, defaulting to 1024.
class function Create: TSdlIOStream; overload; inline; static
Exceptions
ESdlError
: Raised on failure.
Returns
See Also
Remarks
It is safe to call this method from any thread
Flush
Flush any buffered data in the stream.
This method makes sure that any buffered data is written to the stream. Normally this isn't necessary but if the stream is a pipe or socket it guarantees that any pending data is sent.
procedure Flush; inline
Exceptions
ESdlError
: Raised on failure.
See Also
Remarks
This function is not thread safe.
Free
Close and free the I/O stream.
This closes and cleans up the stream. It releases any resources used by the stream and frees the itself.
Note that if this fails to flush the stream for any reason, this function raises an error, but the stream is still invalid once this function returns.
This call flushes any buffered writes to the operating system, but there are no guarantees that those writes have gone to physical media; they might be in the OS's file cache, waiting to go to disk later. If it's absolutely crucial that writes go to disk immediately, so they are definitely stored even if the power fails before the file cache would have caught up, one should call Flush before closing. Note that flushing takes time and makes the system and your app operate less efficiently, so do so sparingly.
procedure Free; inline
Exceptions
ESdlError
: Raised on failure (eg. when the stream failed to flush its output).
Remarks
This function is not thread safe.
Load(Boolean)
Load all the data from the stream.
The data is allocated with a zero byte at the end (null terminated) for convenience.
The data should be freed with SdlFree.
function Load(const AClose: Boolean): Pointer; overload; inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AClose
: Boolean
: If True, calls Free before returning, even in the case of an error.
Returns
Pointer
: The data.
See Also
Remarks
This method is not thread safe.
Load(NativeInt, Boolean)
Load all the data from the stream.
The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in the value reported via ADataSize
.
The data should be freed with SdlFree.
function Load(out ADataSize: NativeInt; const AClose: Boolean): Pointer; overload; inline
Exceptions
ESdlError
: Raised on failure.
Parameters
ADataSize
: NativeInt
: Will be set to the number of bytes read.
AClose
: Boolean
: If True, calls Free before returning, even in the case of an error.
Returns
Pointer
: The data.
See Also
Remarks
This method is not thread safe.
Read(Pointer, NativeInt)
Read from the stream.
This function reads up ASize
bytes from the stream to the area pointed at by APtr
. This function may read less bytes than requested.
This function will return zero when the data stream is completely read, Status will return TSdlIOStatus.Eof. If zero is returned and the stream is not at EOF, Status will return a different error value and an ESdlError will be raised.
function Read(const APtr: Pointer; const ASize: NativeInt): NativeInt
Exceptions
ESdlError
: Raised on failure.
Parameters
APtr
: Pointer
: A pointer to a buffer to read data into.
ASize
: NativeInt
: The number of bytes to read from the stream.
Returns
NativeInt
: The number of bytes read, or 0 on end of file.
See Also
Remarks
This function is not thread safe.
ReadS16BE
Read a signed 16-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS16BE: Int16; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int16
: The data read.
Remarks
This method is not thread safe.
ReadS16LE
Read a signed 16-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS16LE: Int16; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int16
: The data read.
Remarks
This method is not thread safe.
ReadS32BE
Read a signed 32-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS32BE: Int32; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int32
: The data read.
Remarks
This method is not thread safe.
ReadS32LE
Read a signed 32-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS32LE: Int32; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int32
: The data read.
Remarks
This method is not thread safe.
ReadS64BE
Read a signed 64-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS64BE: Int64; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int64
: The data read.
Remarks
This method is not thread safe.
ReadS64LE
Read a signed 64-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS64LE: Int64; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int64
: The data read.
Remarks
This method is not thread safe.
ReadS8
Read a signed byte from the stream.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadS8: Int8; inline
Exceptions
ESdlError
: Raised on failure.
Returns
Int8
: The data read.
Remarks
This method is not thread safe.
ReadU16BE
Read an unsigned 16-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU16BE: UInt16; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt16
: The data read.
Remarks
This method is not thread safe.
ReadU16LE
Read an unsigned 16-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU16LE: UInt16; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt16
: The data read.
Remarks
This method is not thread safe.
ReadU32BE
Read an unsigned 32-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU32BE: UInt32; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt32
: The data read.
Remarks
This method is not thread safe.
ReadU32LE
Read an unsigned 32-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU32LE: UInt32; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt32
: The data read.
Remarks
This method is not thread safe.
ReadU64BE
Read an unsigned 64-bit big-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU64BE: UInt64; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt64
: The data read.
Remarks
This method is not thread safe.
ReadU64LE
Read an unsigned 64-bit little-endian integer from the stream.
SDL byteswaps the data only if necessary, so the data returned will be in the native byte order.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU64LE: UInt64; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt64
: The data read.
Remarks
This method is not thread safe.
ReadU8
Read an unsigned byte from the stream.
This function will return False when the data stream is completely read, Status will return TSdlIOStatus.Eof.
function ReadU8: UInt8; inline
Exceptions
ESdlError
: Raised on failure.
Returns
UInt8
: The data read.
Remarks
This method is not thread safe.
Save(Pointer, NativeInt, Boolean)
Save all the data into the stream.
procedure Save(const AData: Pointer; const ADataSize: NativeInt; const AClose: Boolean); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AData
: Pointer
: The data to be written. If ADataSize is 0, may be nil or a invalid pointer.
ADataSize
: NativeInt
: The number of bytes to be written.
AClose
: Boolean
: If true, calls Free before returning, even in the case of an error.
See Also
Remarks
This method is not thread safe.
Seek(Int64, TSdlIOWhence)
Seek within the data stream.
This method seeks to byte AOffset
, relative to AWhence
.
AWhence
may be any of the following values:
TSdlIOWhence.Set
: seek from the beginning of dataTSdlIOWhence.Cur
: seek relative to current read pointTSdlIOWhence.End
: seek relative to the end of data
function Seek(const AOffset: Int64; const AWhence: TSdlIOWhence): Int64; inline
Parameters
AOffset
: Int64
: An offset in bytes, relative to AWhence
location; can be negative.
AWhence
: TSdlIOWhence
: Relative seek origin.
Returns
Int64
: The final offset in the data stream after the seek.
See Also
Remarks
This function is not thread safe.
Tell
Determine the current read/write offset in the data stream.
This is actually a wrapper function that calls Seek
with an offset of 0 bytes from TSdlIOWhence.Cur
, to simplify application development.
function Tell: Int64; inline
Returns
Int64
: The current offset in the stream, or -1 if the information can not be determined.
See Also
Remarks
This function is not thread safe.
Write(Pointer, NativeInt)
Write to the stream.
This function writes exactly ASize
bytes from the area pointed at by APtr
to the stream. If this fails for any reason, it will return less than ASize
to demonstrate how far the write progressed. On success, it returns ASize
.
On error, this function still attempts to write as much as possible, so it might return a positive value less than the requested write size.
The caller can use Status to determine if the problem is recoverable, such as a non-blocking write that can simply be retried later. When there is a fatal error, an ESdlError will be raised.
function Write(const APtr: Pointer; const ASize: NativeInt): NativeInt
Exceptions
ESdlError
: Raised on failure.
Parameters
APtr
: Pointer
: A pointer to a buffer containing data to write.
ASize
: NativeInt
: The number of bytes to write.
Returns
NativeInt
: The number of bytes written, which will be less than ASize
on failure.
See Also
Remarks
This function is not thread safe.
WriteS16BE(Int16)
Write a signed 16-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteS16BE(const AValue: Int16); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int16
: The value to write.
Remarks
This method is not thread safe.
WriteS16LE(Int16)
Write a signed 16-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteS16LE(const AValue: Int16); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int16
: The value to write.
Remarks
This method is not thread safe.
WriteS32BE(Int32)
Write a signed 32-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteS32BE(const AValue: Int32); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int32
: The value to write.
Remarks
This method is not thread safe.
WriteS32LE(Int32)
Write a signed 32-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteS32LE(const AValue: Int32); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int32
: The value to write.
Remarks
This method is not thread safe.
WriteS64BE(Int64)
Write a signed 64-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteS64BE(const AValue: Int64); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int64
: The value to write.
Remarks
This method is not thread safe.
WriteS64LE(Int64)
Write a signed 64-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteS64LE(const AValue: Int64); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int64
: The value to write.
Remarks
This method is not thread safe.
WriteS8(Int8)
Write a signed byte to the stream.
procedure WriteS8(const AValue: Int8); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: Int8
: The value to write.
Remarks
This method is not thread safe.
WriteU16BE(UInt16)
Write an unsigned 16-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteU16BE(const AValue: UInt16); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt16
: The value to write.
Remarks
This method is not thread safe.
WriteU16LE(UInt16)
Write an unsigned 16-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteU16LE(const AValue: UInt16); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt16
: The value to write.
Remarks
This method is not thread safe.
WriteU32BE(UInt32)
Write an unsigned 32-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteU32BE(const AValue: UInt32); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt32
: The value to write.
Remarks
This method is not thread safe.
WriteU32LE(UInt32)
Write an unsigned 32-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteU32LE(const AValue: UInt32); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt32
: The value to write.
Remarks
This method is not thread safe.
WriteU64BE(UInt64)
Write an unsigned 64-bit integer to the stream as big-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in big-endian format.
procedure WriteU64BE(const AValue: UInt64); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt64
: The value to write.
Remarks
This method is not thread safe.
WriteU64LE(UInt64)
Write an unsigned 64-bit integer to the stream as little-endian data.
SDL byteswaps the data only if necessary, so the application always specifies native format, and the data written will be in little-endian format.
procedure WriteU64LE(const AValue: UInt64); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt64
: The value to write.
Remarks
This method is not thread safe.
WriteU8(UInt8)
Write an unsigned byte to the stream.
procedure WriteU8(const AValue: UInt8); inline
Exceptions
ESdlError
: Raised on failure.
Parameters
AValue
: UInt8
: The value to write.
Remarks
This method is not thread safe.