Package java.nio

Examples of java.nio.ByteBuffer.limit()


      return null;

    final ByteBuffer buffer = APIUtil.getBufferByte(bytes);
    getInfo(object, param_name, buffer, null);

    buffer.limit(bytes - 1); // Exclude null-termination
    return APIUtil.getString(buffer);
  }

  protected final int getSizeRet(final T object, final int param_name) {
    final PointerBuffer bytes = APIUtil.getBufferPointer();
View Full Code Here


        return null;

      final ByteBuffer buffer = APIUtil.getBufferByte(bytes);
      clGetProgramBuildInfo(program, device, param_name, buffer, null);

      buffer.limit(bytes - 1); // Exclude null-termination
      return APIUtil.getString(buffer);
    }

    public int getBuildInfoInt(final CLProgram program, final CLDevice device, final int param_name) {
      program.checkValid();
View Full Code Here

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

       
        int  rem = buffer.remaining();
       
        if ( rem > to_write ){
         
          buffer.limit( buffer.position() + to_write );
         
          to_write = 0;
         
        }else{
         
View Full Code Here

       
        for (int i=array_offset;i<array_offset+length;i++){
         
          ByteBuffer  buffer = buffers[i];
         
          buffer.limit( limits[i] );
        }
      }
     
      write_rem -= total_written;
     
View Full Code Here

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

       
        int  rem = buffer.remaining();
       
        if ( rem > to_read ){
         
          buffer.limit( buffer.position() + to_read );
         
          to_read = 0;
         
        }else{
         
View Full Code Here

       
        for (int i=array_offset;i<array_offset+length;i++){
         
          ByteBuffer  buffer = buffers[i];
         
          buffer.limit( limits[i] );
        }
      }
     
      read_rem -= read;
     
View Full Code Here

          }
        }

        ByteBuffer last_buff = (ByteBuffer)raw_buffers[buffer_count - 1 ];
       
        int orig_last_limit = last_buff.limit();
       
        if ( total_sofar > max_bytes ){
         
          last_buff.limit( orig_last_limit - (total_sofar - max_bytes) );
        }
View Full Code Here

       
        int orig_last_limit = last_buff.limit();
       
        if ( total_sofar > max_bytes ){
         
          last_buff.limit( orig_last_limit - (total_sofar - max_bytes) );
        }

        transport.write( raw_buffers, 0, buffer_count );

        last_buff.limit( orig_last_limit );
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.