Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Writes the bytes contained in the Byte Array to the specified file. 

Returns true if successful.

...

Writes a subset of the bytes contained in the Byte Array to the specified file. 
"length" bytes are written, starting at the zero-based start_index. 

Returns true if successful.

...

Reads the specified file into the Byte Array. 

Any data currently in the Byte Array is discarded.

Returns true if successful.

ReadFile(path as String, start_pos as Integer, length as Integer) As Boolean

Reads a section of the file into the Byte Array. 
"length" bytes are read, starting at the zero-based start_pos.  Any data currently in the Byte Array is discarded.
Note that in WriteFile, start_index is an index into the Byte Array, but in ReadFile, start_pos is an index into the file.

Any data currently in the Byte Array is discarded.

Returns true if successful.

AppendFile(path as String) As Boolean

Appends the contents of the Byte Array to the specified file.

Returns true if successful.

SetResize(min_size as Integer, auto_resize as Boolean) As Boolean

If the size of the Byte Array is less than min_size, expands the Byte Array to min_size. 
Also sets the auto-resize attribute of the Byte Array to the specified value.

Returns true if successful.

ToHexString() As String

Returns a hexadecimal string representing the contents of the Byte Array, two digits per byte.

...

Sets the contents of the Byte Array to the specified value. 
The string must be an even number of hexadecimal digits.
The string must contain valid hexadecimal digits, or the result is undefined.

Any data currently in the Byte Array is discarded.

...

Sets the contents of the Byte Array to the specified value. 
The string must be a valid base-64 encoding.

Any data currently in the Byte Array is discarded.

...

Returns the contents of the Byte Array as a string.
The contents must be valid UTF-8 (or ASCII subset), or the result is undefined.

FromAsciiString(s as String)

Sets the contents of the Byte Array to the specified string using UTF-8 encoding.  
Any data currently in the Byte Array is discarded.

...