# FlutterStandardWriter

Objective-C

    @interface FlutterStandardWriter : NSObject

Swift

    class FlutterStandardWriter : NSObject

A writer of the Flutter standard binary encoding.

See `FlutterStandardMessageCodec` for details on the encoding.

The encoding is extensible via subclasses overriding `writeValue`.

- `-initWithData:`

  Create a `FlutterStandardWriter` who will write to \p data.

  #### Declaration

  Objective-C

      - (nonnull instancetype)initWithData:(nonnull NSMutableData *)data;

  Swift

      init(data: NSMutableData)

- `-writeByte:`

  Write a 8-bit byte.

  #### Declaration

  Objective-C

      - (void)writeByte:(UInt8)value;

  Swift

      func writeByte(_ value: UInt8)

- `-writeBytes:length:`

  Write an array of \p bytes of size \p length.

  #### Declaration

  Objective-C

      - (void)writeBytes:(nonnull const void *)bytes length:(NSUInteger)length;

  Swift

      func writeBytes(_ bytes: UnsafeRawPointer, length: UInt)

- `-writeData:`

  Write an array of bytes contained in \p data.

  #### Declaration

  Objective-C

      - (void)writeData:(nonnull NSData *)data;

  Swift

      func write(_ data: Data)

- `-writeSize:`

  Write 32-bit unsigned integer that represents a \p size of a collection.

  #### Declaration

  Objective-C

      - (void)writeSize:(UInt32)size;

  Swift

      func writeSize(_ size: UInt32)

- `-writeAlignment:`

  Write zero padding until data is aligned with \p alignment.

  #### Declaration

  Objective-C

      - (void)writeAlignment:(UInt8)alignment;

  Swift

      func writeAlignment(_ alignment: UInt8)

- `-writeUTF8:`

  Write a string with UTF-8 encoding.

  #### Declaration

  Objective-C

      - (void)writeUTF8:(nonnull NSString *)value;

  Swift

      func writeUTF8(_ value: String)

- `-writeValue:`

  Introspects into an object and writes its representation. *

  - Supported Data Types:
  - - NSNull
  - - NSNumber
  - - NSString (as UTF-8)
  - - FlutterStandardTypedData
  - - NSArray of supported types
  - - NSDictionary of supporte types *
  - NSAsserts on failure.

  #### Declaration

  Objective-C

      - (void)writeValue:(nonnull id)value;

  Swift

      func writeValue(_ value: Any)

© 2023 Flutter. All rights reserved. (Last updated: 2023-03-28)

Generated by jazzy ♪♫ v0.14.3, a Realm project.