private DecodingState getCurrentState() throws Exception { DecodingState state = this.currentState; if (state == null) { state = init(); initialized = true; } return state; } }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(skippedBytes); }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(false, out); }
/** * {@inheritDoc} */ @Override public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception { state.finishDecode(out); }
/** * {@inheritDoc} */ @Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { if (in.hasRemaining()) { return finishDecode(in.get(), out); } return this; }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { IoBuffer readData; if (buffer == null) { readData = IoBuffer.allocate(0); } else { readData = buffer.flip(); buffer = null; } return finishDecode(readData, out); }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { IoBuffer product; // When input contained only CR or LF rather than actual data... if (buffer == null) { product = IoBuffer.allocate(0); } else { product = buffer.flip(); buffer = null; } return finishDecode(product, out); }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { IoBuffer product; // When input contained only terminator rather than actual data... if (buffer == null) { product = IoBuffer.allocate(0); } else { product = buffer.flip(); buffer = null; } return finishDecode(product, out); }
/** * {@inheritDoc} */ @Override public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception { state.finishDecode(out); }
private DecodingState getCurrentState() throws Exception { DecodingState state = this.currentState; if (state == null) { state = init(); initialized = true; } return state; } }
/** * {@inheritDoc} */ public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(skippedBytes); }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(false, out); }
public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { if (in.hasRemaining()) { return finishDecode(in.get(), out); } return this; }
/** * {@inheritDoc} */ public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception { state.finishDecode(out); }
private DecodingState getCurrentState() throws Exception { DecodingState state = this.currentState; if (state == null) { state = init(); initialized = true; } return state; } }
/** * {@inheritDoc} */ @Override public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(skippedBytes); }
/** * {@inheritDoc} */ public DecodingState finishDecode(ProtocolDecoderOutput out) throws Exception { return finishDecode(false, out); }
/** * {@inheritDoc} */ @Override public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out) throws Exception { if (in.hasRemaining()) { return finishDecode(in.get(), out); } return this; }
@Override public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = (DecodingState)session.removeAttribute(DECODING_STATE); if (decodingState != null) { decodingState.finishDecode(out); } }
@Override public void finishDecode(IoSession session, ProtocolDecoderOutput out) throws Exception { DecodingState decodingState = (DecodingState) session.removeAttribute(DECODING_STATE); if (decodingState != null) { decodingState.finishDecode(out); } }