fill static method
Implementation
static Future<int> fill(LByteBuffer buffer, AFileReader channel) async {
int r = buffer.remaining;
// channel reads return -1 when EOF or other error
// because they a non-blocking reads, 0 is a valid return value!!
while (buffer.remaining > 0 && r != -1) {
r = await channel.readIntoBuffer(buffer);
}
buffer.limit = buffer.position;
return r;
}