marked = true;
}
if( remaining > allowed ) { //read only part of this buffer
bb.limit( bb.position() + allowed ); //limit current buffer
bytes_available += bb.remaining();
shrink_remaining_buffers = true; //shrink any tail buffers
}
else { //full buffer is allowed to be read
bytes_available += remaining;
allowed -= remaining; //count this buffer toward allowed and move on to the next