byte[] data = new byte[buf.limit()]; buf.get(data); CharsetDecoder decoder = ctx.getDecoder();
byte[] data = new byte[buf.limit()]; buf.get(data); CharsetDecoder decoder = ctx.getDecoder();
buf.limit(buf.limit() - matchCount); try { writeText(session, buf.getString(ctx.getDecoder()), out); } finally { buf.clear();
buf.limit(buf.limit() - matchCount); try { writeText(session, buf.getString(ctx.getDecoder()), out); } finally { buf.clear();
writeText(session, buf.getString(ctx.getDecoder()), out); } finally { buf.clear();
writeText(session, buf.getString(ctx.getDecoder()), out); } finally { buf.clear();
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 ) ); } }