synchronized (readGuard) {
int available = delegate.available();
if (available == -1 ){
throwBufferUnderflowExceptionIfNotComplete();
throw new ClosedChannelException();
} else if (available < required) {
throw new BufferUnderflowException();
} else {