Examples of flip()


Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.flip()

   
       
    DirectByteBuffer header = DirectByteBufferPool.getBuffer( DirectByteBuffer.AL_MSG_BT_HEADER, 5 );
    header.putInt( DirectByteBuffer.SS_MSG, 1 + payload_size );
    header.put( DirectByteBuffer.SS_MSG, ld.bt_id );
    header.flip( DirectByteBuffer.SS_MSG );
   
    DirectByteBuffer[] raw_buffs = new DirectByteBuffer[ payload.length + 1 ];
    raw_buffs[0] = header;
    for( int i=0; i < payload.length; i++ ) {
      raw_buffs[i+1] = payload[i];
View Full Code Here

Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.flip()

      header.putInt( bss, id_bytes.length );
      header.put( bss, id_bytes );
      header.put( bss, version );
    }
   
    header.flip( bss );
   
    DirectByteBuffer[] raw_buffs = new DirectByteBuffer[ payload.length + 1 ];
    raw_buffs[0] = header;
    for( int i=0; i < payload.length; i++ ) {
      raw_buffs[i+1] = payload[i];
View Full Code Here

Examples of org.gudy.azureus2.core3.util.DirectByteBuffer.flip()

           
                raf.setLength( first_piece_length );
              }
            }
           
            buffer.flip( DirectByteBuffer.AL_FILE );
           
            target_access.write( raf, new DirectByteBuffer[]{ buffer }, last_piece_start );
           
          }finally{
           
View Full Code Here

Examples of org.jgroups.util.FixedSizeBitSet.flip()

        FixedSizeBitSet set=new FixedSizeBitSet(10);
        for(int i=0; i < set.size(); i++)
            if(i % 2 == 0)
                set.set(i);
        System.out.println("set = " + set);
        set.flip();
        System.out.println("set = " + set);
        for(int i=0; i < set.size(); i++)
            assert set.get(i) == (i %2 != 0);
    }
View Full Code Here

Examples of org.lwjgl.PointerBuffer.flip()

    PointerBuffer buffer = getLengths(strings.length);

    for ( CharSequence string : strings )
      buffer.put(string.length());

    buffer.flip();
    return buffer;
  }

  /**
   * Returns a buffer containing the lengths of the specified buffers.
View Full Code Here

Examples of org.lwjgl.PointerBuffer.flip()

    PointerBuffer lengths = getLengths(buffers.length);

    for ( ByteBuffer buffer : buffers )
      lengths.put(buffer.remaining());

    lengths.flip();
    return lengths;
  }

  static int getSize(final PointerBuffer lengths) {
    long size = 0;
View Full Code Here

Examples of org.restlet.engine.io.Buffer.flip()

public class BufferTestCase extends RestletTestCase {

    public void testFlip() throws IOException {
        Buffer buffer = new Buffer(8192);
        buffer.fill("abcdefghijklm");
        buffer.flip();

        for (int i = 0; i < 4; i++) {
            // Drain first characters
            buffer.drain();
        }
View Full Code Here

Examples of org.xtreemfs.foundation.buffer.ReusableBuffer.flip()

        // store data to the buffer
        ReusableBuffer testBuffer = BufferPool.allocate(key.length + value.length);
               
        testBuffer.put(key);
        testBuffer.put(value);
        testBuffer.flip();
       
        // retrieve data from the buffer
        byte[] rKey = new byte[key.length];
        byte[] rValue = new byte[value.length];
       
View Full Code Here

Examples of railo.runtime.img.Image.flip()

    else if("180".equals(strTranspose)) transpose=TransposeDescriptor.ROTATE_180;
    else if("270".equals(strTranspose)) transpose=TransposeDescriptor.ROTATE_270;
    else throw new FunctionException(pc,"ImageFlip",2,"transpose","invalid transpose definition ["+strTranspose+"], " +
        "valid transpose values are [vertical,horizontal,diagonal,90,180,270]");
   
    img.flip(transpose);
    return null;
  }
 
}
View Full Code Here

Examples of reactor.io.Buffer.flip()

          Buffer newBuff = new Buffer();
          while(zin.available() > 0) {
            newBuff.append((byte)zin.read());
          }
          zin.close();
          IN in = delegate.decoder(null).apply(newBuff.flip());
          if(null != next) {
            next.accept(in);
            return null;
          } else {
            return in;
View Full Code Here
TOP
Copyright © 2015 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.