Initializes AsyncStreams in prefix mode. This mode can only be used if both sides of the connection adhere to the "prefix" protocol. In / Out - The monitored streams. BigEndian - The prefix endianess.
IsInitializedAsBoolean
OutputQueueSizeAsInt
SendAllAndCloseAsBoolean
Sends a message to the internal message queue. AsyncStreams will be closed when the message is processed. The Terminated event will be raised. Returns False is AsyncStreams is closed.
StreamFolderAsString
Gets or sets the folder that is used when receiving streams.
Asynchronously writes the data. Buffer - The array holding the data. Start - The position in the array of the first byte that will be written. Length - Number of bytes to write.
Asynchronously converts the bytes to object. The BytesToObject event will be raised when the object is ready. Do not reuse the same B4XSerializator instance when calling asynchronous methods.
ConvertObjectToBytes (ObjectAsObject) AsByte()
In-memory version of RandomAccessFile.WriteB4XObject. This method is capable of writing the following types: Lists, Arrays, Maps, Strings, primitive types and user types. Combinations of these types are also supported.
Asynchronously converts the object to bytes. The ObjectToBytes event will be raised with the serialized bytes. Do not reuse the same B4XSerializator instance when calling asynchronous methods.
Copies data from the source array to the destination array. Src - The source array. SrcOffset - The position of the first byte that will be copied. Dest - The destination array. DestOffset - The position in the destination array of the first byte. Count - Number of bytes to copy.
DoublesFromBytes (Bytes() AsByte) AsDouble()
Converts an array of Bytes to an array of Doubles. Each 8 bytes are converted to a Double.
DoublesToBytes (Doubles() AsDouble) AsByte()
Converts an array of Doubles to an array of Bytes. Each Double is converted to 8 bytes.
FloatsFromBytes (Bytes() AsByte) AsFloat()
Converts an array of Bytes to an array of Floats. Each 4 bytes are converted to a Float.
FloatsToBytes (Doubles() AsFloat) AsByte()
Converts an array of Floats to an array of Bytes. Each Float is converted to 4 bytes.
HexFromBytes (Bytes() AsByte) AsString
Returns the hex representation of the given bytes.
HexToBytes (HexAsString) AsByte()
Parses a hex string to an array of bytes.
IntsFromBytes (Bytes() AsByte) AsInt()
Converts an array of Bytes to an array of Ints. Each 4 bytes are converted to an Int.
IntsToBytes (Ints() AsInt) AsByte()
Converts an array of Ints to an array of Bytes. Each Int is converted to 4 bytes.
LittleEndianAsBoolean
Gets or sets the converter endianess. The default value is False (big endian).
LongsFromBytes (Bytes() AsByte) AsLong()
Converts an array of Bytes to an array of Longs. Each 8 bytes are converted to a Long.
LongsToBytes (Longs() AsLong) AsByte()
Converts an array of Longs to an array of Bytes. Each Long is converted to 8 bytes.
ShortsFromBytes (Bytes() AsByte) AsShort()
Converts an array of Bytes to an array of Shorts. Each 2 bytes are converted to a Short.
ShortsToBytes (Shorts() AsShort) AsByte()
Converts an array of Shorts to an array of Bytes. Each Short is converted to 2 bytes.
Compresses the Data array using zlib or gzip compression. Returns the compressed data as an array of bytes. Data - The data to compress. CompressMethod - "zlib" or "gzip"
Decompresses the data using zlib or gzip compression. Returns the uncompressed data as an array of bytes. CompressedData - The data to decompress. CompressMethod - "zlib" or "gzip"
Reads the bytes from Position to Position + Length (exclusive) and writes them to the given array starting from StartOffset. The position is updated automatically.
ReadDouble (PositionAsLong) AsDouble
Reads a Double value (8 bytes). The position is updated automatically.
ReadFloat (PositionAsLong) AsFloat
Reads a Float value (4 bytes). The position is updated automatically.
ReadInt (PositionAsLong) AsInt
Reads an Int value (4 bytes). The position is updated automatically.
ReadLong (PositionAsLong) AsLong
Reads a Long value (8 bytes). The position is updated automatically.
ReadShort (PositionAsLong) AsShort
Reads a Short value (2 bytes). The position is updated automatically.
ReadSignedByte (PositionAsLong) AsInt
ReadUnsignedByte (PositionAsLong) AsByte
Reads a single byte. The position is updated automatically.
SizeAsLong [read only]
Returns the total size.
WriteB4XObject (ObjectAsObject, PositionAsLong)
Writes the given object to the file. This method is capable of writing the following types: Lists, Arrays, Maps, Strings, primitive types and user types. Combinations of these types are also supported.
WriteByte (ValueAsByte, PositionAsLong)
Writes a single Byte. The position is updated automatically.