SerialBuffer constructor

SerialBuffer(
  1. Uint8List array
)

@param __namedParameters

  • array: null if serializing, or binary data to deserialize
  • textEncoder: TextEncoder instance to use. Pass in null if running in a browser
  • textDecoder: TextDecider instance to use. Pass in null if running in a browser

Implementation

SerialBuffer(this.array) {
  // array = array || new Uint8List(1024);
  length = array.length;
  // textEncoder = textEncoder || new TextEncoder();
  // textDecoder = textDecoder || new TextDecoder('utf-8', { fatal: true });
}