/** * @param in The in to set. */ public void addInput(ByteBuffer in) { boolean fillable=false; try(Locker.Lock lock = _locker.lock()) { if (isEOF(_inQ.peek())) throw new RuntimeIOException(new EOFException()); boolean was_empty=_inQ.isEmpty(); if (in==null) { _inQ.add(EOF); fillable=true; } if (BufferUtil.hasContent(in)) { _inQ.add(in); fillable=was_empty; } } if (fillable) _runFillable.run(); }
@Override protected void needsFillInterest() throws IOException { try(Locker.Lock lock = _locker.lock()) { if (!isOpen()) throw new ClosedChannelException(); ByteBuffer in = _inQ.peek(); if (BufferUtil.hasContent(in) || isEOF(in)) execute(_runFillable); } }
/** * @param in The in to set. */ public void addInput(ByteBuffer in) { boolean fillable=false; try(Locker.Lock lock = _locker.lock()) { if (isEOF(_inQ.peek())) throw new RuntimeIOException(new EOFException()); boolean was_empty=_inQ.isEmpty(); if (in==null) { _inQ.add(EOF); fillable=true; } if (BufferUtil.hasContent(in)) { _inQ.add(in); fillable=was_empty; } } if (fillable) _runFillable.run(); }
public void addInputAndExecute(ByteBuffer in) { boolean fillable=false; try(Locker.Lock lock = _locker.lock()) { if (isEOF(_inQ.peek())) throw new RuntimeIOException(new EOFException()); boolean was_empty=_inQ.isEmpty(); if (in==null) { _inQ.add(EOF); fillable=true; } if (BufferUtil.hasContent(in)) { _inQ.add(in); fillable=was_empty; } } if (fillable) execute(_runFillable); }
@Override protected void needsFillInterest() throws IOException { try(Locker.Lock lock = _locker.lock()) { if (!isOpen()) throw new ClosedChannelException(); ByteBuffer in = _inQ.peek(); if (BufferUtil.hasContent(in) || isEOF(in)) execute(_runFillable); } }
public void addInputAndExecute(ByteBuffer in) { boolean fillable=false; try(Locker.Lock lock = _locker.lock()) { if (isEOF(_inQ.peek())) throw new RuntimeIOException(new EOFException()); boolean was_empty=_inQ.isEmpty(); if (in==null) { _inQ.add(EOF); fillable=true; } if (BufferUtil.hasContent(in)) { _inQ.add(in); fillable=was_empty; } } if (fillable) execute(_runFillable); }
if (isEOF(in))