Package org.jnetpcap.nio

Examples of org.jnetpcap.nio.JBuffer.transferFrom()


    header.setWirelen(buffer.size());

    final int len = buffer.size();
    JBuffer b = getMemoryBuffer(len);

    b.transferFrom(buffer); // Make a buffer to buffer copy

    peer(b, 0, len);
   
    header.setWirelen(len);
  }
View Full Code Here


   */
  public int transferStateAndDataFrom(ByteBuffer buffer) {
    final int len = buffer.limit() - buffer.position();
    JBuffer b = getMemoryBuffer(len);

    b.transferFrom(buffer, 0);

    return peerStateAndData(b, 0);
  }

  /**
 
View Full Code Here

   */
  public int transferStateAndDataFrom(JBuffer buffer) {
    final int len = buffer.size();
    JBuffer b = getMemoryBuffer(len);

    b.transferFrom(buffer);

    return peerStateAndData(b, 0);
  }

  /**
 
View Full Code Here

   */
  public int transferStateAndDataFrom(ByteBuffer buffer) {
    final int len = buffer.limit() - buffer.position();
    JBuffer b = getMemoryBuffer(len);

    b.transferFrom(buffer, 0);

    return peerStateAndData(b, 0);
  }

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