Class PcapFormatUtils

java.lang.Object
org.apache.drill.exec.store.pcap.PcapFormatUtils

public class PcapFormatUtils extends Object
  • Constructor Details

    • PcapFormatUtils

      public PcapFormatUtils()
  • Method Details

    • getIntFileOrder

      public static int getIntFileOrder(boolean byteOrder, byte[] buf, int offset)
      Parameters:
      byteOrder - true for forward file order, false fore revers file order
      buf - byte buffer
      offset - buffer offset
      Returns:
      integer value of specific bytes from buffer
    • getShortFileOrder

      public static int getShortFileOrder(boolean byteOrder, byte[] buf, int offset)
      Parameters:
      byteOrder - true for forward file order, false for reverse file order
      buf - byte buffer
      offset - buffer offset
      Returns:
      short value as int of specific bytes from buffer
    • getInt

      public static int getInt(byte[] buf, int offset)
    • getShort

      public static int getShort(byte[] buf, int offset)
    • getByte

      public static int getByte(byte[] buf, int offset)
    • convertShort

      public static int convertShort(byte[] data, int offset)
    • convertInt

      public static int convertInt(byte[] data, int offset)
    • parseBytesToASCII

      public static String parseBytesToASCII(byte[] data)