Package org.apache.drill.exec.store.pcap
Class PcapFormatUtils
java.lang.Object
org.apache.drill.exec.store.pcap.PcapFormatUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intconvertInt(byte[] data, int offset) static intconvertShort(byte[] data, int offset) static intgetByte(byte[] buf, int offset) static intgetInt(byte[] buf, int offset) static intgetIntFileOrder(boolean byteOrder, byte[] buf, int offset) static intgetShort(byte[] buf, int offset) static intgetShortFileOrder(boolean byteOrder, byte[] buf, int offset) static StringparseBytesToASCII(byte[] data)
-
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 orderbuf- byte bufferoffset- 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 orderbuf- byte bufferoffset- 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
-