Package org.gudy.azureus2.core3.util

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


     
      DirectByteBuffer   header = DirectByteBufferPool.getBuffer( DirectByteBuffer.AL_EXTERNAL, 4 );
     
      header.putInt( DirectByteBuffer.SS_MSG, payload.remaining( DirectByteBuffer.SS_MSG ));
     
      header.flip( DirectByteBuffer.SS_MSG );
     
      return(
        new RawMessage[]{
          new RawMessageImpl(
            message,
View Full Code Here


       
      }else{
       
        if ( read_buffer.position( DirectByteBuffer.SS_PROXY ) > 0 ){
         
          read_buffer.flip(DirectByteBuffer.SS_PROXY);
         
          int  written = read_buffer.write( DirectByteBuffer.SS_PROXY, chan2 );
                 
          if ( chan1 == source_channel ){
           
View Full Code Here

   
       
    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

      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

           
                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

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.