A utility class for reading/writing from/to a fm.liveswitch.FileAssistant#getFile. More...
Public Member Functions | |
FileAssistant (fm.liveswitch.FileStream file) | |
Initializes a new instance of the fm.liveswitch.FileAssistant class. More... | |
fm.liveswitch.FileStream | getFile () |
Gets the file. More... | |
boolean | getLittleEndian () |
Gets whether to read/write using little-endian ordering. More... | |
byte[] | read (int length) |
Reads a value from a File. More... | |
int | read16 () |
Converts a 16-bit network representation to an integer. More... | |
int | read24 () |
Converts a 24-bit network representation to an integer. More... | |
long | read32 () |
Converts a 32-bit network representation to an integer. More... | |
long | read40 () |
Converts a 40-bit network representation to an integer. More... | |
long | read48 () |
Converts a 48-bit network representation to an integer. More... | |
long | read56 () |
Converts a 56-bit network representation to an integer. More... | |
long | read64 () |
Converts a 64-bit network representation to an integer. More... | |
int | read8 () |
Converts an 8-bit network representation to an integer. More... | |
byte[] | readOpaque16 () |
Reads a 16-bit-length opaque value from a File. More... | |
byte[] | readOpaque24 () |
Reads a 24-bit-length opaque value from a File. More... | |
byte[] | readOpaque32 () |
Reads a 32-bit-length opaque value from a File. More... | |
byte[] | readOpaque8 () |
Reads an 8-bit-length opaque value from a File. More... | |
void | setLittleEndian (boolean value) |
Sets whether to read/write using little-endian ordering. More... | |
void | write (byte[] value) |
Adds a value to a File. More... | |
void | write (byte[] value, int offset, int length) |
Adds a value to a File. More... | |
void | write16 (int value) |
Adds a 16-bit value to a File. More... | |
void | write16To (int location, int value) |
Adds a 16-bit value to a File. More... | |
void | write24 (int value) |
Adds a 24-bit value to a File. More... | |
void | write24To (int location, int value) |
Adds a 24-bit value to a File. More... | |
void | write32 (long value) |
Adds a 32-bit value to a File. More... | |
void | write32To (int location, long value) |
Adds a 32-bit value to a File. More... | |
void | write40 (long value) |
Adds a 40-bit value to a File. More... | |
void | write40To (int location, long value) |
Adds a 40-bit value to a File. More... | |
void | write48 (long value) |
Adds a 48-bit value to a File. More... | |
void | write48To (int location, long value) |
Adds a 48-bit value to a File. More... | |
void | write56 (long value) |
Adds a 56-bit value to a File. More... | |
void | write56To (int location, long value) |
Adds a 56-bit value to a File. More... | |
void | write64 (long value) |
Adds a 64-bit value to a File. More... | |
void | write64To (int location, long value) |
Adds a 64-bit value to a File. More... | |
void | write8 (int value) |
Adds an 8-bit value to a File. More... | |
void | write8To (int location, int value) |
Adds an 8-bit value to a File. More... | |
void | writeOpaque16 (byte[] value) |
Adds a 16-bit-length opaque value to a File. More... | |
void | writeOpaque16To (int location, byte[] value) |
Adds a 16-bit-length opaque value to a File. More... | |
void | writeOpaque24 (byte[] value) |
Adds a 24-bit-length opaque value to a File. More... | |
void | writeOpaque24To (int location, byte[] value) |
Adds a 24-bit-length opaque value to a File. More... | |
void | writeOpaque32 (byte[] value) |
Adds a 32-bit-length opaque value to a File. More... | |
void | writeOpaque32To (int location, byte[] value) |
Adds a 32-bit-length opaque value to a File. More... | |
void | writeOpaque40 (byte[] value) |
Adds a 40-bit-length opaque value to a File. More... | |
void | writeOpaque40To (int location, byte[] value) |
Adds a 40-bit-length opaque value to a File. More... | |
void | writeOpaque48 (byte[] value) |
Adds a 48-bit-length opaque value to a File. More... | |
void | writeOpaque48To (int location, byte[] value) |
Adds a 48-bit-length opaque value to a File. More... | |
void | writeOpaque56 (byte[] value) |
Adds a 56-bit-length opaque value to a File. More... | |
void | writeOpaque56To (int location, byte[] value) |
Adds a 56-bit-length opaque value to a File. More... | |
void | writeOpaque64 (byte[] value) |
Adds a 64-bit-length opaque value to a File. More... | |
void | writeOpaque64To (int location, byte[] value) |
Adds a 64-bit-length opaque value to a File. More... | |
void | writeOpaque8 (byte[] value) |
Adds an 8-bit-length opaque value to a File. More... | |
void | writeOpaque8To (int location, byte[] value) |
Adds an 8-bit-length opaque value to a File. More... | |
void | writeTo (int location, byte[] value) |
Adds a value to a File. More... | |
Static Public Member Functions | |
static byte[] | readAllBytes (String path) |
Reads all the bytes of a file into a byte array. More... | |
A utility class for reading/writing from/to a fm.liveswitch.FileAssistant#getFile.
fm.liveswitch.FileAssistant.FileAssistant | ( | fm.liveswitch.FileStream | file | ) |
Initializes a new instance of the fm.liveswitch.FileAssistant class.
file | The file. |
fm.liveswitch.FileStream fm.liveswitch.FileAssistant.getFile | ( | ) |
Gets the file.
boolean fm.liveswitch.FileAssistant.getLittleEndian | ( | ) |
Gets whether to read/write using little-endian ordering.
byte [] fm.liveswitch.FileAssistant.read | ( | int | length | ) |
Reads a value from a File.
length | The number of bytes to read. |
int fm.liveswitch.FileAssistant.read16 | ( | ) |
Converts a 16-bit network representation to an integer.
int fm.liveswitch.FileAssistant.read24 | ( | ) |
Converts a 24-bit network representation to an integer.
long fm.liveswitch.FileAssistant.read32 | ( | ) |
Converts a 32-bit network representation to an integer.
long fm.liveswitch.FileAssistant.read40 | ( | ) |
Converts a 40-bit network representation to an integer.
long fm.liveswitch.FileAssistant.read48 | ( | ) |
Converts a 48-bit network representation to an integer.
long fm.liveswitch.FileAssistant.read56 | ( | ) |
Converts a 56-bit network representation to an integer.
long fm.liveswitch.FileAssistant.read64 | ( | ) |
Converts a 64-bit network representation to an integer.
int fm.liveswitch.FileAssistant.read8 | ( | ) |
Converts an 8-bit network representation to an integer.
|
static |
Reads all the bytes of a file into a byte array.
path | The filepath to the file to read. |
byte [] fm.liveswitch.FileAssistant.readOpaque16 | ( | ) |
Reads a 16-bit-length opaque value from a File.
byte [] fm.liveswitch.FileAssistant.readOpaque24 | ( | ) |
Reads a 24-bit-length opaque value from a File.
byte [] fm.liveswitch.FileAssistant.readOpaque32 | ( | ) |
Reads a 32-bit-length opaque value from a File.
byte [] fm.liveswitch.FileAssistant.readOpaque8 | ( | ) |
Reads an 8-bit-length opaque value from a File.
void fm.liveswitch.FileAssistant.setLittleEndian | ( | boolean | value | ) |
Sets whether to read/write using little-endian ordering.
void fm.liveswitch.FileAssistant.write | ( | byte[] | value | ) |
Adds a value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write | ( | byte[] | value, |
int | offset, | ||
int | length | ||
) |
Adds a value to a File.
value | The value. |
offset | The offset. |
length | The length. |
void fm.liveswitch.FileAssistant.write16 | ( | int | value | ) |
Adds a 16-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write16To | ( | int | location, |
int | value | ||
) |
Adds a 16-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write24 | ( | int | value | ) |
Adds a 24-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write24To | ( | int | location, |
int | value | ||
) |
Adds a 24-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write32 | ( | long | value | ) |
Adds a 32-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write32To | ( | int | location, |
long | value | ||
) |
Adds a 32-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write40 | ( | long | value | ) |
Adds a 40-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write40To | ( | int | location, |
long | value | ||
) |
Adds a 40-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write48 | ( | long | value | ) |
Adds a 48-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write48To | ( | int | location, |
long | value | ||
) |
Adds a 48-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write56 | ( | long | value | ) |
Adds a 56-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write56To | ( | int | location, |
long | value | ||
) |
Adds a 56-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write64 | ( | long | value | ) |
Adds a 64-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write64To | ( | int | location, |
long | value | ||
) |
Adds a 64-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.write8 | ( | int | value | ) |
Adds an 8-bit value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.write8To | ( | int | location, |
int | value | ||
) |
Adds an 8-bit value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque16 | ( | byte[] | value | ) |
Adds a 16-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque16To | ( | int | location, |
byte[] | value | ||
) |
Adds a 16-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque24 | ( | byte[] | value | ) |
Adds a 24-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque24To | ( | int | location, |
byte[] | value | ||
) |
Adds a 24-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque32 | ( | byte[] | value | ) |
Adds a 32-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque32To | ( | int | location, |
byte[] | value | ||
) |
Adds a 32-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque40 | ( | byte[] | value | ) |
Adds a 40-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque40To | ( | int | location, |
byte[] | value | ||
) |
Adds a 40-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque48 | ( | byte[] | value | ) |
Adds a 48-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque48To | ( | int | location, |
byte[] | value | ||
) |
Adds a 48-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque56 | ( | byte[] | value | ) |
Adds a 56-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque56To | ( | int | location, |
byte[] | value | ||
) |
Adds a 56-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque64 | ( | byte[] | value | ) |
Adds a 64-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque64To | ( | int | location, |
byte[] | value | ||
) |
Adds a 64-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque8 | ( | byte[] | value | ) |
Adds an 8-bit-length opaque value to a File.
value | The value. |
void fm.liveswitch.FileAssistant.writeOpaque8To | ( | int | location, |
byte[] | value | ||
) |
Adds an 8-bit-length opaque value to a File.
location | The location to write to. |
value | The value. |
void fm.liveswitch.FileAssistant.writeTo | ( | int | location, |
byte[] | value | ||
) |
Adds a value to a File.
location | The location to write to. |
value | The value. |