@Tyhj
        
        2017-02-24T12:48:03.000000Z
        字数 336
        阅读 2212
    Java
在使用mina框架时候,传输的数据太多的话会出错,因为数据长度有限制。 
解决方法:
TextLineCodecFactory textLineCodecFactory=new TextLineCodecFactory();//在这里设置限制长度textLineCodecFactory.setDecoderMaxLineLength(102400);textLineCodecFactory.setEncoderMaxLineLength(102400);//设定这个过滤器将一行一行(/r/n)的读取数据chain.addLast("myChin", new ProtocolCodecFilter(textLineCodecFactory));
