本文整理了Java中org.apache.mina.common.ByteBuffer.acquire()
方法的一些代码示例,展示了ByteBuffer.acquire()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.acquire()
方法的具体详情如下:
包路径:org.apache.mina.common.ByteBuffer
类名称:ByteBuffer
方法名:acquire
[英]Increases the internal reference count of this buffer to defer automatic release. You have to invoke #release() as many as you invoked this method to release this buffer.
[中]增加此缓冲区的内部引用计数以延迟自动释放。您必须调用#release(),调用的次数与调用此方法释放此缓冲区的次数相同。
代码示例来源:origin: org.apache.directory.mina/mina-core
public static void acquireIfPossible( Object message )
{
if( message instanceof ByteBuffer )
{
( ( ByteBuffer ) message ).acquire();
}
}
代码示例来源:origin: org.apache.directory.mina/mina-core
public void acquire()
{
buf.acquire();
}
代码示例来源:origin: org.apache.directory.mina/mina-filter-codec-asn1
wrappedBuf.acquire(); // acquire once more to prvent leak
encOut.write( wrappedBuf );
内容来源于网络,如有侵权,请联系作者删除!