org.apache.mina.common.ByteBuffer.hasRemaining()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(211)

本文整理了Java中org.apache.mina.common.ByteBuffer.hasRemaining()方法的一些代码示例,展示了ByteBuffer.hasRemaining()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ByteBuffer.hasRemaining()方法的具体详情如下:
包路径:org.apache.mina.common.ByteBuffer
类名称:ByteBuffer
方法名:hasRemaining

ByteBuffer.hasRemaining介绍

暂无

代码示例

代码示例来源:origin: org.apache.directory.mina/mina-core

public boolean hasRemaining()
{
  return buf.hasRemaining();
}

代码示例来源:origin: org.apache.directory.mina/mina-core

public int read()
{
  if( ByteBuffer.this.hasRemaining() )
  {
    return ByteBuffer.this.get() & 0xff;
  }
  else
  {
    return -1;
  }
}

代码示例来源:origin: org.apache.directory.mina/mina-core

public WriteFuture flush()
{
  Queue bufferQueue = this.bufferQueue;
  WriteFuture future = null;
  if( bufferQueue.isEmpty() )
  {
    return null;
  }
  else
  {
    for( ;; )
    {
      ByteBuffer buf = ( ByteBuffer ) bufferQueue.pop();
      if( buf == null )
      {
        break;
      }
      
      // Flush only when the buffer has remaining.
      if( buf.hasRemaining() )
      {
        future = doFlush( buf );
      }
    }
  }
  
  return future;
}

代码示例来源:origin: org.apache.directory.mina/mina-core

if( hasRemaining() )

代码示例来源:origin: org.apache.directory.mina/mina-core

if( !hasRemaining() )
  while( hasRemaining() )
if( !hasRemaining() )
  if( hasRemaining() )

代码示例来源:origin: org.apache.directory.mina/mina-core

public void write( ByteBuffer src )
{
  synchronized( mutex )
  {
    if( closed )
    {
      return;
    }
    if( buf.hasRemaining() )
    {
      this.buf.compact();
      this.buf.put( src );
      this.buf.flip();
    }
    else
    {
      this.buf.clear();
      this.buf.put( src );
      this.buf.flip();
      mutex.notifyAll();
    }
  }
}

代码示例来源:origin: org.apache.directory.mina/mina-core

if( !buf.hasRemaining() )
if ( buf.hasRemaining() )

代码示例来源:origin: org.apache.directory.mina/mina-core

if( !hasRemaining() )
if( !hasRemaining() )
  if( hasRemaining() )

代码示例来源:origin: org.apache.directory.mina/mina-core

if( buf.hasRemaining() )

代码示例来源:origin: org.reddwarfserver.client/sgs-client

while (msgBuf.hasRemaining()) {
  if (msgBuf.remaining() < 2) {
    break;

代码示例来源:origin: org.apache.directory.mina/mina-core

int oldPos = in.position();
int oldLimit = in.limit();
while( in.hasRemaining() )

代码示例来源:origin: org.apache.mina/mina-filter-ssl

if (buf.hasRemaining()) {

代码示例来源:origin: org.apache.directory.mina/mina-core

int oldPos = in.position();
int oldLimit = in.limit();
while( in.hasRemaining() )

相关文章