copyFrom method
Implementation
int copyFrom(TStream source, int count) {
if (count <= 0) {
source.position = 0;
count = source.size;
}
final buf = List<int>.filled(count, 0);
final n = source.read(buf, count);
write(buf, n);
return n;
}