Buffer.fromList constructor

Buffer.fromList(
  1. Iterable<int> bytes
)

Creates a Buffer from a list of bytes.

Implementation

factory Buffer.fromList(final Iterable<int> bytes) {
  return Buffer(bytes.length).._data.setAll(0, bytes);
}