在通道和缓冲区部分,我自己写了个服务端的代码,然后用telnet连测试,我想把结果返回给telnet。
WritableByteChannel output = Channels.newChannel(System.out);
上面这个是标准输出,要实现我的那个功能应该怎么改,求大大们教我。
------解决方案--------------------
socket就行了,outputstream write
WritableByteChannel output = Channels.newChannel(System.out);