streamInput method

void streamInput(
  1. List<int> bytes
)

Implementation

void streamInput(List<int> bytes) {
  if (inputSet && input is InputStream) {
    var i = input as InputStream;
    i.offset = _blockPos;
    final inputLen = input.length;
    final newLen = inputLen + bytes.length;
    final newBytes = Uint8List(newLen);
    newBytes.setRange(0, inputLen, i.buffer, i.offset);
    newBytes.setRange(inputLen, newLen, bytes, 0);

    input = InputStream(newBytes);
  } else {
    input = InputStream(bytes);
  }
  inputSet = true;
}