FlutterStandardReader
@interface FlutterStandardReader : NSObject
A reader of the Flutter standard binary encoding.
See FlutterStandardMessageCodec for details on the encoding.
The encoding is extensible via subclasses overriding readValueOfType.
-
Create a new
FlutterStandardReaderwho reads from \p data.Declaration
Objective-C
- (nonnull instancetype)initWithData:(nonnull NSData *)data; -
Returns YES when the reader hasn’t reached the end of its data.
Declaration
Objective-C
- (BOOL)hasMore; -
Reads a byte value and increments the position.
Declaration
Objective-C
- (UInt8)readByte; -
Reads a sequence of byte values of \p length and increments the position.
Declaration
Objective-C
- (void)readBytes:(nonnull void *)destination length:(NSUInteger)length; -
Reads a sequence of byte values of \p length and increments the position.
Declaration
Objective-C
- (nonnull NSData *)readData:(NSUInteger)length; -
Reads a 32-bit unsigned integer representing a collection size and increments the position.
Declaration
Objective-C
- (UInt32)readSize; -
Advances the read position until it is aligned with \p alignment.
Declaration
Objective-C
- (void)readAlignment:(UInt8)alignment; -
Read a null terminated string encoded with UTF-8/
Declaration
Objective-C
- (nonnull NSString *)readUTF8; -
Reads a byte for
FlutterStandardFieldthe decodes a value matching that type.See also: -[FlutterStandardWriter writeValue]
Declaration
Objective-C
- (nullable id)readValue; -
Decodes a value matching the \p type specified.
See also:
FlutterStandardField-[FlutterStandardWriter writeValue]
Declaration
Objective-C
- (nullable id)readValueOfType:(UInt8)type;
View on GitHub
Install in Dash
FlutterStandardReader Class Reference