IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
in.position(pos); if (ctx.getOverflowPosition() == 0) { IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
IoBuffer buf = ctx.getBuffer(); buf.flip(); buf.limit(buf.limit() - matchCount);
public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws Exception { Context ctx = getContext(session); if( LineDelimiter.AUTO.equals( delimiter ) ) { ctx.setMatchCount( decodeAuto( in, ctx.getBuffer(), ctx.getMatchCount(), ctx.getDecoder(), out ) ); } else { ctx.setMatchCount( decodeNormal( in, ctx.getBuffer(), ctx.getMatchCount(), ctx.getDecoder(), out ) ); } }
public void dispose( IoSession session ) throws Exception { Context ctx = ( Context ) session.getAttribute( CONTEXT ); if( ctx != null ) { ctx.getBuffer().release(); session.removeAttribute( CONTEXT ); } }
public void append(IoBuffer in) { if (overflowPosition != 0) { discard(in); } else if (buf.position() > maxLineLength - in.remaining()) { overflowPosition = buf.position(); buf.clear(); discard(in); } else { getBuffer().put(in); } }
public void append(IoBuffer in) { if (overflowPosition != 0) { discard(in); } else if (buf.position() > maxLineLength - in.remaining()) { overflowPosition = buf.position(); buf.clear(); discard(in); } else { getBuffer().put(in); } }
public void append(IoBuffer in) { if (overflowPosition != 0) { discard(in); } else if (buf.position() > maxLineLength - in.remaining()) { overflowPosition = buf.position(); buf.clear(); discard(in); } else { getBuffer().put(in); } }