本文整理了Java中org.apache.mina.common.ByteBuffer.buf()
方法的一些代码示例,展示了ByteBuffer.buf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.buf()
方法的具体详情如下:
包路径:org.apache.mina.common.ByteBuffer
类名称:ByteBuffer
方法名:buf
[英]Returns the underlying NIO buffer instance.
[中]返回基础NIO缓冲区实例。
代码示例来源:origin: apache/incubator-dubbo
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: apache/incubator-dubbo
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: org.apache.directory.mina/mina-core
public java.nio.ByteBuffer buf()
{
return buf.buf();
}
代码示例来源:origin: org.apache.directory.mina/mina-core
/**
* @see java.nio.ByteBuffer#put(byte[], int, int)
*/
public abstract ByteBuffer put( byte[] src, int offset, int length );
代码示例来源:origin: org.apache.directory.mina/mina-filter-codec-asn1
public void decode( IoSession session, ByteBuffer in,
ProtocolDecoderOutput out ) throws DecoderException
{
callback.decOut = out;
decoder.decode( in.buf() );
}
代码示例来源:origin: org.apache.directory.mina/mina-core
if( in.hasRemaining() )
cr = encoder.encode( in, buf(), true );
cr = encoder.flush( buf() );
代码示例来源:origin: org.apache.directory.mina/mina-core
int writtenBytes = ch.write( buf.buf() );
if( writtenBytes > 0 )
代码示例来源:origin: net.jahhan/dubbo-remoting-mina
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: remoting/dubbox
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: com.alibaba/dubbo-remoting-mina
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: remoting/dubbox
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: com.alibaba/dubbo
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: org.apache.dubbo/dubbo-remoting-mina
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: org.apache.dubbo/dubbo
buffer.writeBytes(in.buf());
frame = buffer;
} else {
frame = ChannelBuffers.dynamicBuffer(size > bufferSize ? size : bufferSize);
frame.writeBytes(buffer, buffer.readableBytes());
frame.writeBytes(in.buf());
frame = ChannelBuffers.wrappedBuffer(in.buf());
代码示例来源:origin: org.apache.directory.mina/mina-core
int writtenBytes = ch.write( buf.buf() );
代码示例来源:origin: org.apache.directory.mina/mina-core
int writtenBytes = ch.send( buf.buf(), destination );
代码示例来源:origin: org.apache.directory.mina/mina-core
while( ( ret = ch.read( buf.buf() ) ) > 0 )
代码示例来源:origin: org.apache.directory.mina/mina-core
private void readSession( DatagramSessionImpl session )
{
ByteBuffer readBuf = ByteBuffer.allocate( session.getReadBufferSize() );
try
{
int readBytes = session.getChannel().read( readBuf.buf() );
if( readBytes > 0 )
{
readBuf.flip();
ByteBuffer newBuf = ByteBuffer.allocate( readBuf.limit() );
newBuf.put( readBuf );
newBuf.flip();
session.increaseReadBytes( readBytes );
( ( DatagramFilterChain ) session.getFilterChain() ).messageReceived( session, newBuf );
}
}
catch( IOException e )
{
( ( DatagramFilterChain ) session.getFilterChain() ).exceptionCaught( session, e );
}
finally
{
readBuf.release();
}
}
代码示例来源:origin: org.apache.directory.mina/mina-core
private void readSession( DatagramSessionImpl session )
{
ByteBuffer readBuf = ByteBuffer.allocate( session.getReadBufferSize() );
try
{
SocketAddress remoteAddress = session.getChannel().receive(
readBuf.buf() );
if( remoteAddress != null )
{
readBuf.flip();
session.setRemoteAddress( remoteAddress );
ByteBuffer newBuf = ByteBuffer.allocate( readBuf.limit() );
newBuf.put( readBuf );
newBuf.flip();
session.increaseReadBytes( newBuf.remaining() );
( ( DatagramFilterChain ) session.getFilterChain() ).messageReceived( session, newBuf );
}
}
catch( IOException e )
{
( ( DatagramFilterChain ) session.getFilterChain() ).exceptionCaught( session, e );
}
finally
{
readBuf.release();
}
}
代码示例来源:origin: org.apache.mina/mina-filter-ssl
handler.messageReceived(nextFilter, buf.buf());
内容来源于网络,如有侵权,请联系作者删除!