beautypg.com

BrightSign Object Reference Manual (FW 5.1) User Manual

Page 20

background image

12

ReadFile(file_path As String, start_index As Integer, length As Integer) As Boolean:
Reads a section of the specified file into the byte array. This method reads

length bytes, beginning at

start_index of the file. This operation will discard any data currently contained in the byte array.

AppendFile(file_path As String) As Boolean: Appends the contents of the byte array to the specified
file.

SetResize(minimum_allocation_size As Integer, autoresize As Boolean): Expands the size of
the byte array to the

minimum_allocation_size if it is less than the minimum_allocation_size. This

method also accepts a Boolean parameter that specifies whether the byte array should be resized automatically or
not.

ToHexString() As String: Returns a hexadecimal string representation of the contents of the byte array.
Each byte is represented as two hex digits.

FromHexString(hex_string As String): Writes the contents of the passed hexadecimal string to the byte
array. The passed string must contain an even number of hex digits. This operation will discard any data currently
contained in the byte array.

ToBase64String() As String: Returns the contents of the byte array as a base64-formatted string.

FromBase64String(base_64_string As String): Writes the contents of a valid base64-formatted string to
the byte array. This operation will discard any data currently contained in the byte array.

ToAsciiString() As String: Returns the contents of the byte array as an ASCII-formatted string.

FromAsciiString(a As String): Writes the contents of a valid ASCII-formatted string to the byte array. This
operation will discard any data currently contained in the byte array.

GetSignedByte(index As Integer) As Integer: Returns the signed byte at the specified zero-based
index in the byte array. To read an unsigned byte within a byte array, use the ifArrayGet.GetEntry() method or the
[] array operator.

GetSignedLong(index As Integer) As Integer: Retrieves the integer located at the specified long-word
index of the byte array. Note that this method cannot accept a byte index as its parameter.

IsLittleEndianCPU() As Boolean: Returns True if the CPU architecture is little-endian.