Examples of limit()


Examples of java.nio.ByteBuffer.limit()

         
          packet_buffer.put( buffer );
         
        }finally{
         
          buffer.limit( limit );
        }
       
        if ( rem == 0 ){
         
          break;
View Full Code Here

Examples of java.nio.ByteBuffer.limit()

    }
  }

  private static ByteBuffer doNoCopyWrap(ByteBuffer buffer) {
    ByteBuffer direct_buffer = lookupBuffer(buffer);
    direct_buffer.limit(buffer.limit());
    direct_buffer.position(buffer.position());
    return direct_buffer;
  }

  private static ShortBuffer doNoCopyWrap(ShortBuffer buffer) {
View Full Code Here

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

Examples of java.nio.ByteBuffer.limit()

        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

Examples of java.nio.ByteBuffer.limit()

     
      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

Examples of java.nio.ByteBuffer.limit()

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

Examples of java.nio.ByteBuffer.limit()

       
        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

Examples of java.nio.ByteBuffer.limit()

     
      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

Examples of java.nio.ByteBuffer.limit()

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

Examples of java.nio.ByteBuffer.limit()

       
        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
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.