writeByteData method

ByteData writeByteData(
  1. int length
)

Returns a length-long native ByteData view beginning at readerIndex (inclusive) and increments the writerIndex by length.


Exceptions:

Implementation

ByteData writeByteData(int length) {
  ensureWritable(length);
  assertWriteable(writerIndex, length);
  try {
    return viewByteData(writerIndex, length);
  } finally {
    writerIndex += length;
  }
}