日期:2014-05-20 浏览次数:20743 次
public void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out)throws Exception { ByteBuffer buf = in.buf(); byte[] msg = new byte[buf.limit()]; buf.get(msg); String ss = new String(msg,"UTF-8"); out.write(ss); out.flush();