Examples of remaining()


Examples of java.nio.ByteBuffer.remaining()

          marked = true;
        }

        if( remaining > allowed ) {  //read only part of this buffer
          bb.limit( bb.position() + allowed )//limit current buffer
          bytes_available += bb.remaining();
          shrink_remaining_buffers = true//shrink any tail buffers
        }
        else //full buffer is allowed to be read
          bytes_available += remaining;
          allowed -= remaining;  //count this buffer toward allowed and move on to the next
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

    try{
      for (int i=array_offset;i<array_offset+length;i++){
       
        ByteBuffer  buffer = buffers[i];
       
        int  size = buffer.remaining();
       
        if ( size > 0 ){
         
          copy_db[i= DirectByteBufferPool.getBuffer( DirectByteBuffer.AL_NET_CRYPT, size );
         
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

        ByteBuffer  buffer = buffers[i];
       
        int  limit = buffer.limit();
       
        try{
          if ( buffer.remaining() > rem ){
           
            buffer.limit( buffer.position() + rem );
          }
         
          rem -= buffer.remaining();
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

          if ( buffer.remaining() > rem ){
           
            buffer.limit( buffer.position() + rem );
          }
         
          rem -= buffer.remaining();
         
          packet_buffer.put( buffer );
         
        }finally{
         
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

       
        ByteBuffer  buffer = buffers[i];
       
        limits[i= buffer.limit();
       
        int  rem = buffer.remaining();
       
        if ( rem > to_write ){
         
          buffer.limit( buffer.position() + to_write );
         
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

     
      for (int i=array_offset;i<array_offset+length;i++){
       
        ByteBuffer  buffer = buffers[i];
       
        int  space = buffer.remaining();
       
        if ( space > 0 ){
         
          if ( space < read_insert.remaining()){
           
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

       
        ByteBuffer  buffer = buffers[i];
       
        limits[i= buffer.limit();
       
        int  rem = buffer.remaining();
       
        if ( rem > to_read ){
         
          buffer.limit( buffer.position() + to_read );
         
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

       
        ByteBuffer bb = buffers[ i ];
         
        int orig_limit = data_already_read.limit();
         
        if( data_already_read.remaining() > bb.remaining() ) {
         
          data_already_read.limit( data_already_read.position() + bb.remaining() );
        }
         
        inserted += data_already_read.remaining();
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

         
        int orig_limit = data_already_read.limit();
         
        if( data_already_read.remaining() > bb.remaining() ) {
         
          data_already_read.limit( data_already_read.position() + bb.remaining() );
        }
         
        inserted += data_already_read.remaining();
         
        bb.put( data_already_read );
View Full Code Here

Examples of java.nio.ByteBuffer.remaining()

           
            raw_buffers[buffer_count] = buff;
           
            orig_positions[buffer_count] = buff.position();
           
            total_sofar += buff.remaining();

            buffer_count++;
           
            if ( total_sofar >= max_bytes ){
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.