Package org.apache.drill.exec.store.pcap
Class PcapFormatUtils
java.lang.Object
org.apache.drill.exec.store.pcap.PcapFormatUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
convertInt
(byte[] data, int offset) static int
convertShort
(byte[] data, int offset) static int
getByte
(byte[] buf, int offset) static int
getInt
(byte[] buf, int offset) static int
getIntFileOrder
(boolean byteOrder, byte[] buf, int offset) static int
getShort
(byte[] buf, int offset) static int
getShortFileOrder
(boolean byteOrder, byte[] buf, int offset) static String
parseBytesToASCII
(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
-