readBytes method
Reads the number of data bytes, specified by the length parameter, from the byte stream.
Implementation
void readBytes(ByteArray bytes, [int offset = 0, int length = 0]) {
if (length == 0) {
length = bytesAvailable;
}
var sourceBytes = _readBytes(length);
bytes._setAll(offset, sourceBytes);
}