1.buffer包结构:
2.核心类:IoBuffer
A byte buffer used by MINA applications.
This is a replacement for ByteBuffer. Please refer to ByteBuffer documentation for preliminary usage. MINA does not use NIO ByteBuffer directly for two reasons:
It doesn't provide useful getters and putters such as fill, get/putString, and get/putAsciiInt() enough.
It is difficult to write variable-length data due to its fixed capacity
(1)IoBuffer基于以下两个原因,取代Nio标准包中的ByteBuffer,在mina中缓存字节
(a)提供 get/putString、get/putAsciiInt()等方法来填充数据
(b)可供扩展长度数据使用
(2)基本操作
Allocation:IoBuffer buf = IoBuffer.allocate(1024, false); //false,true代表是否useDirectBuffer
AutoExpand: buf.setAutoExpand(true);
AutoShrink:自动设置buf.setAutoShrink(true),手工设置shrink()
(3)抽象类AbstractIoBuffer及代理方法IoBufferWrapper继承于IoBuffer
(4)IoBuffer分配方式:IoBufferAllocator
默认为:private static IoBufferAllocator allocator = new SimpleBufferAllocator();
可通过 :public static void setAllocator(IoBufferAllocator newAllocator)来改变这个分配方式
其中有继承于IoBufferAllocator的类有:SimpleBufferAllocator、CachedBufferAllocator
相关推荐
org.apache.mina.core.buffer.IoBuffer mina core 包
Apache MINA是 Apache 组织一个较新的项目,它为开发高性能和高可用性的网络应用程序提供了非常便利的框架。 当前发行的 MINA 版本支持基于 Java NIO 技术的 TCP/UDP 应用程序开发、串口通讯程序(只在最新的预览版...
hive 开发UDF 使用maven工程 引发jar包缺失 hive 开发UDF 使用maven工程 引发jar包缺失
apache-mina-2.0.16.zip
mina-filter-compression-2.0.7.jar,mina 过滤器jar包,核心包之一
初学调用webservice的demo,适合初学者入门,资源包括axis2的库文件,以及org.apache.mina等库文件
mina-core-2.0.1.jar,apache-mina-2.0.1
核心jar包
apache mina的官方zip包。包里有包的说明和源代码。
其中包括mina开发的所有jar包,以及slf4j-1.5.6.zip包,如果你要用到mina开发项目只需要下载本资源就一次性搞定了~~
整个框架最核心的几个包是:org.apache.mina.core.service, org.apache.mina.core.session, org.apache.mina.core.polling以及org.apache.mina.transport.socket。
apache-mina-2.0.7架包与源码(里面包含架包与源码)。
Apache MINA是一个网络应用程序框架,用来帮助用户简单地开发高性能和高可靠性的网络应用程序。 apache-mina-2.0.7-bin.zip,apache-mina-2.0.7-src.zip,log4j-1.2.17.zip,slf4j-api-1.6.6.jar,slf4j-api-1.6.6-...
这是一个基于spring mina 的服务端整合框架
最新的Apache Mina v2.0.8 API手册,chm格式,2014年9月下旬制作。
apache-mina-2.0.16-bin.zip;apache-mina-2.0.16.zip
最新apache mina jar包,最新资源文件
Apache Mina中文参考手册 Apache MINA是一个网络应用程序框架,用来帮助用户简单地开发高性能和高可靠性的网络应用程序
Apache_Mina的一个不错的教程,值得收藏
基于Apache Mina实现的TCP长连接和短连接实例 详细说明,可参见blog http://blog.csdn.net/peterwanghao/article/details/6900523