FMLiveSwitchFileAssistant Class Reference

A utility class for reading/writing from/to a file (FMLiveSwitchFileAssistant). More...

Instance Methods

(FMLiveSwitchFileStream *) - file
 Gets the file. More...
 
(instancetype) - initWithFile:
 Initializes a new instance of the FMLiveSwitchFileAssistant class. More...
 
(bool) - littleEndian
 Gets whether to read/write using little-endian ordering. 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 long) - read32
 Converts a 32-bit network representation to an integer. More...
 
(long long) - read40
 Converts a 40-bit network representation to an integer. More...
 
(long long) - read48
 Converts a 48-bit network representation to an integer. More...
 
(long long) - read56
 Converts a 56-bit network representation to an integer. More...
 
(long long) - read64
 Converts a 64-bit network representation to an integer. More...
 
(int) - read8
 Converts an 8-bit network representation to an integer. More...
 
(NSMutableData *) - readOpaque16
 Reads a 16-bit-length opaque value from a File. More...
 
(NSMutableData *) - readOpaque24
 Reads a 24-bit-length opaque value from a File. More...
 
(NSMutableData *) - readOpaque32
 Reads a 32-bit-length opaque value from a File. More...
 
(NSMutableData *) - readOpaque8
 Reads an 8-bit-length opaque value from a File. More...
 
(NSMutableData *) - readWithLength:
 Reads a value from a File. More...
 
(void) - setLittleEndian:
 Sets whether to read/write using little-endian ordering. More...
 
(void) - write:
 Adds a value to a File. More...
 
(void) - write:offset:length:
 Adds a value to a File. More...
 
(void) - write16:
 Adds a 16-bit value to a File. More...
 
(void) - write16ToWithLocation:value:
 Adds a 16-bit value to a File. More...
 
(void) - write24:
 Adds a 24-bit value to a File. More...
 
(void) - write24ToWithLocation:value:
 Adds a 24-bit value to a File. More...
 
(void) - write32:
 Adds a 32-bit value to a File. More...
 
(void) - write32ToWithLocation:value:
 Adds a 32-bit value to a File. More...
 
(void) - write40:
 Adds a 40-bit value to a File. More...
 
(void) - write40ToWithLocation:value:
 Adds a 40-bit value to a File. More...
 
(void) - write48:
 Adds a 48-bit value to a File. More...
 
(void) - write48ToWithLocation:value:
 Adds a 48-bit value to a File. More...
 
(void) - write56:
 Adds a 56-bit value to a File. More...
 
(void) - write56ToWithLocation:value:
 Adds a 56-bit value to a File. More...
 
(void) - write64:
 Adds a 64-bit value to a File. More...
 
(void) - write64ToWithLocation:value:
 Adds a 64-bit value to a File. More...
 
(void) - write8:
 Adds an 8-bit value to a File. More...
 
(void) - write8ToWithLocation:value:
 Adds an 8-bit value to a File. More...
 
(void) - writeOpaque16:
 Adds a 16-bit-length opaque value to a File. More...
 
(void) - writeOpaque16ToWithLocation:value:
 Adds a 16-bit-length opaque value to a File. More...
 
(void) - writeOpaque24:
 Adds a 24-bit-length opaque value to a File. More...
 
(void) - writeOpaque24ToWithLocation:value:
 Adds a 24-bit-length opaque value to a File. More...
 
(void) - writeOpaque32:
 Adds a 32-bit-length opaque value to a File. More...
 
(void) - writeOpaque32ToWithLocation:value:
 Adds a 32-bit-length opaque value to a File. More...
 
(void) - writeOpaque40:
 Adds a 40-bit-length opaque value to a File. More...
 
(void) - writeOpaque40ToWithLocation:value:
 Adds a 40-bit-length opaque value to a File. More...
 
(void) - writeOpaque48:
 Adds a 48-bit-length opaque value to a File. More...
 
(void) - writeOpaque48ToWithLocation:value:
 Adds a 48-bit-length opaque value to a File. More...
 
(void) - writeOpaque56:
 Adds a 56-bit-length opaque value to a File. More...
 
(void) - writeOpaque56ToWithLocation:value:
 Adds a 56-bit-length opaque value to a File. More...
 
(void) - writeOpaque64:
 Adds a 64-bit-length opaque value to a File. More...
 
(void) - writeOpaque64ToWithLocation:value:
 Adds a 64-bit-length opaque value to a File. More...
 
(void) - writeOpaque8:
 Adds an 8-bit-length opaque value to a File. More...
 
(void) - writeOpaque8ToWithLocation:value:
 Adds an 8-bit-length opaque value to a File. More...
 
(void) - writeToWithLocation:value:
 Adds a value to a File. More...
 

Class Methods

(FMLiveSwitchFileAssistant *) + fileAssistantWithFile:
 Initializes a new instance of the FMLiveSwitchFileAssistant class. More...
 
(NSMutableData *) + readAllBytesWithPath:
 Reads all the bytes of a file into a byte array. More...
 

Detailed Description

A utility class for reading/writing from/to a file (FMLiveSwitchFileAssistant).

Method Documentation

◆ file

- (FMLiveSwitchFileStream*) file

Gets the file.

◆ fileAssistantWithFile:

+ (FMLiveSwitchFileAssistant*) fileAssistantWithFile: (FMLiveSwitchFileStream *)  file

Initializes a new instance of the FMLiveSwitchFileAssistant class.

Parameters
fileThe file.

◆ initWithFile:

- (instancetype) initWithFile: (FMLiveSwitchFileStream *)  file

Initializes a new instance of the FMLiveSwitchFileAssistant class.

Parameters
fileThe file.

◆ littleEndian

- (bool) littleEndian

Gets whether to read/write using little-endian ordering.

◆ read16

- (int) read16

Converts a 16-bit network representation to an integer.

◆ read24

- (int) read24

Converts a 24-bit network representation to an integer.

◆ read32

- (long long) read32

Converts a 32-bit network representation to an integer.

◆ read40

- (long long) read40

Converts a 40-bit network representation to an integer.

◆ read48

- (long long) read48

Converts a 48-bit network representation to an integer.

◆ read56

- (long long) read56

Converts a 56-bit network representation to an integer.

◆ read64

- (long long) read64

Converts a 64-bit network representation to an integer.

◆ read8

- (int) read8

Converts an 8-bit network representation to an integer.

◆ readAllBytesWithPath:

+ (NSMutableData*) readAllBytesWithPath: (NSString *)  path

Reads all the bytes of a file into a byte array.

Parameters
pathThe filepath to the file to read.

◆ readOpaque16

- (NSMutableData*) readOpaque16

Reads a 16-bit-length opaque value from a File.

◆ readOpaque24

- (NSMutableData*) readOpaque24

Reads a 24-bit-length opaque value from a File.

◆ readOpaque32

- (NSMutableData*) readOpaque32

Reads a 32-bit-length opaque value from a File.

◆ readOpaque8

- (NSMutableData*) readOpaque8

Reads an 8-bit-length opaque value from a File.

◆ readWithLength:

- (NSMutableData*) readWithLength: (int)  length

Reads a value from a File.

Parameters
lengthThe number of bytes to read.

◆ setLittleEndian:

- (void) setLittleEndian: (bool)  value

Sets whether to read/write using little-endian ordering.

◆ write16:

- (void) write16: (int)  value

Adds a 16-bit value to a File.

Parameters
valueThe value.

◆ write16ToWithLocation:value:

- (void) write16ToWithLocation: (int)  location
value: (int)  value 

Adds a 16-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write24:

- (void) write24: (int)  value

Adds a 24-bit value to a File.

Parameters
valueThe value.

◆ write24ToWithLocation:value:

- (void) write24ToWithLocation: (int)  location
value: (int)  value 

Adds a 24-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write32:

- (void) write32: (long long)  value

Adds a 32-bit value to a File.

Parameters
valueThe value.

◆ write32ToWithLocation:value:

- (void) write32ToWithLocation: (int)  location
value: (long long)  value 

Adds a 32-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write40:

- (void) write40: (long long)  value

Adds a 40-bit value to a File.

Parameters
valueThe value.

◆ write40ToWithLocation:value:

- (void) write40ToWithLocation: (int)  location
value: (long long)  value 

Adds a 40-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write48:

- (void) write48: (long long)  value

Adds a 48-bit value to a File.

Parameters
valueThe value.

◆ write48ToWithLocation:value:

- (void) write48ToWithLocation: (int)  location
value: (long long)  value 

Adds a 48-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write56:

- (void) write56: (long long)  value

Adds a 56-bit value to a File.

Parameters
valueThe value.

◆ write56ToWithLocation:value:

- (void) write56ToWithLocation: (int)  location
value: (long long)  value 

Adds a 56-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write64:

- (void) write64: (long long)  value

Adds a 64-bit value to a File.

Parameters
valueThe value.

◆ write64ToWithLocation:value:

- (void) write64ToWithLocation: (int)  location
value: (long long)  value 

Adds a 64-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write8:

- (void) write8: (int)  value

Adds an 8-bit value to a File.

Parameters
valueThe value.

◆ write8ToWithLocation:value:

- (void) write8ToWithLocation: (int)  location
value: (int)  value 

Adds an 8-bit value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ write:

- (void) write: (NSMutableData *)  value

Adds a value to a File.

Parameters
valueThe value.

◆ write:offset:length:

- (void) write: (NSMutableData *)  value
offset: (int)  offset
length: (int)  length 

Adds a value to a File.

Parameters
valueThe value.
offsetThe offset.
lengthThe length.

◆ writeOpaque16:

- (void) writeOpaque16: (NSMutableData *)  value

Adds a 16-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque16ToWithLocation:value:

- (void) writeOpaque16ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 16-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque24:

- (void) writeOpaque24: (NSMutableData *)  value

Adds a 24-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque24ToWithLocation:value:

- (void) writeOpaque24ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 24-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque32:

- (void) writeOpaque32: (NSMutableData *)  value

Adds a 32-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque32ToWithLocation:value:

- (void) writeOpaque32ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 32-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque40:

- (void) writeOpaque40: (NSMutableData *)  value

Adds a 40-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque40ToWithLocation:value:

- (void) writeOpaque40ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 40-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque48:

- (void) writeOpaque48: (NSMutableData *)  value

Adds a 48-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque48ToWithLocation:value:

- (void) writeOpaque48ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 48-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque56:

- (void) writeOpaque56: (NSMutableData *)  value

Adds a 56-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque56ToWithLocation:value:

- (void) writeOpaque56ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 56-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque64:

- (void) writeOpaque64: (NSMutableData *)  value

Adds a 64-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque64ToWithLocation:value:

- (void) writeOpaque64ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a 64-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeOpaque8:

- (void) writeOpaque8: (NSMutableData *)  value

Adds an 8-bit-length opaque value to a File.

Parameters
valueThe value.

◆ writeOpaque8ToWithLocation:value:

- (void) writeOpaque8ToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds an 8-bit-length opaque value to a File.

Parameters
locationThe location to write to.
valueThe value.

◆ writeToWithLocation:value:

- (void) writeToWithLocation: (int)  location
value: (NSMutableData *)  value 

Adds a value to a File.

Parameters
locationThe location to write to.
valueThe value.