Examples of limit()


Examples of java.nio.ByteBuffer.limit()

        Debug.out( "preReadProcess:: bb["+i+"] == null, decoder destroyed=" +destroyed );
      }
     
     
      if( shrink_remaining_buffers ) {
        bb.limit( 0 )//ensure no read into this next buffer is possible
      }
      else {
        int remaining = bb.remaining();
       
        if( remaining < 1 continue//skip full buffer
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

          pre_read_start_position = bb.position();
          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;
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

      if( bb == null ) {
        Debug.out( "preReadProcess:: bb["+i+"] == null, decoder destroyed=" +destroyed );
      }
     
      if( shrink_remaining_buffers ) {
        bb.limit( 0 )//ensure no read into this next buffer is possible
      }
      else {
        int remaining = bb.remaining();
       
        if( remaining < 1 continue//skip full buffer
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

          pre_read_start_position = bb.position();
          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;
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

      for (int i=array_offset;i<array_offset+length;i++){
       
        ByteBuffer  source_buffer = buffers[i];
       
        int  position   = source_buffer.position();
        int  limit    = source_buffer.limit();
       
        int  size = limit - position;
       
        max_writable  += size;
      }
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

        for (int i=array_offset;i<array_offset+length;i++){
         
          ByteBuffer  source_buffer = buffers[i];
         
          int  position   = source_buffer.position();
          int  limit    = source_buffer.limit();
         
          int  size = limit - position;
         
          if ( size <= skip ){
           
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

    for (int i=array_offset;i<array_offset+length;i++){
     
      ByteBuffer  source_buffer = buffers[i];
     
      int  position   = source_buffer.position();
      int  limit    = source_buffer.limit();
     
      int  size = limit - position;
     
      if ( size == 0 ){
       
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

      total_packets_received++;
    }
   
    ByteBuffer  initial_buffer = ByteBuffer.wrap( initial_data );
   
    initial_buffer.limit( initial_data_length );
   
    if ( !crypto_done ){
     
        // first packet - connection setup and crypto handshake
     
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

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

Examples of java.nio.ByteBuffer.limit()

        int  limit = buffer.limit();
       
        try{
          if ( buffer.remaining() > rem ){
           
            buffer.limit( buffer.position() + rem );
          }
         
          rem -= buffer.remaining();
         
          packet_buffer.put( buffer );
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.