摘要: http://www.189works.com/article-101103-1.html 阅读全文
posted @ 2012-10-21 22:22 feiling 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 现在在做个车务通系统(网站),系统需要与远程的mina服务器端进行交换,服务器端由其他公司开发,只为我们提供接口,在我们的车务通系统中需要通过网络编程调用这些远程接口,所以车务通系统相当于mina的客户端(相对于mina服务器端而言)。流程是这样的 当车务通系统的客户端,也就是浏览器页面,发出请求,车务通系统中的servlet接收,调用mina客户端的Iosession.write()方法 向mina服务器端(也就是远程服务器)发送请求、调用接口后 , 远程服务器会返回响应的处理结果,然后在mina客户端(车务通系统中接收),messageReceive()方法负责接收,在这里遇到了问题,接收 阅读全文
posted @ 2012-10-21 22:21 feiling 阅读(2222) 评论(1) 推荐(0) 编辑
摘要: 先列点代码片段:// ...//// 此段代码功能为从 t.txt 里复制所有数据到 out_j.txt://...1 FileChannel fcin = new FileInputStream( "d:/t.txt" ).getChannel();2 FileChannel fcout = new FileOutputStream( new File( "d:/out_j.txt" )).getChannel();3 ByteBuffer buff = ByteBuffer.allocate( 1024 );4 long t1 = System.cu 阅读全文
posted @ 2012-10-21 22:04 feiling 阅读(499) 评论(0) 推荐(0) 编辑