Class ByteUtil
java.lang.Object
org.opendaylight.lispflowmapping.lisp.util.ByteUtil
- 
Field Summary
Fields - 
Method Summary
Modifier and TypeMethodDescriptionstatic shortasUnsignedByte(byte byteArg) static longasUnsignedInteger(int intArg) static intasUnsignedShort(short shortArg) static byteboolToBit(boolean flag, int bit) static StringbytesToHex(byte[] bytes, int length) static booleanextractBit(byte byteValue, int bitMask) static intgetInt(byte[] inBuffer, int pos) static longgetLong(byte[] inBuffer, int pos) static intgetPartialInt(byte[] inBuffer) static shortgetShort(byte[] inBuffer, int pos) static intgetUnsignedByte(byte[] inBuffer, int pos) static intgetUnsignedByte(ByteBuffer inBuffer) static intgetUnsignedByte(ByteBuffer inBuffer, int pos) static intgetUnsignedShort(byte[] inBuffer, int pos) static intgetUnsignedShort(ByteBuffer inBuffer, int pos) static byte[]partialIntToByteArray(int number, int length)  
- 
Field Details
- 
HEX_ARRAY
protected static final char[] HEX_ARRAY 
 - 
 - 
Method Details
- 
getUnsignedByte
public static int getUnsignedByte(byte[] inBuffer, int pos)  - 
getUnsignedByte
 - 
getUnsignedByte
 - 
getUnsignedShort
public static int getUnsignedShort(byte[] inBuffer, int pos)  - 
getUnsignedShort
 - 
getShort
public static short getShort(byte[] inBuffer, int pos)  - 
getInt
public static int getInt(byte[] inBuffer, int pos)  - 
getPartialInt
public static int getPartialInt(byte[] inBuffer)  - 
asUnsignedByte
public static short asUnsignedByte(byte byteArg)  - 
asUnsignedShort
public static int asUnsignedShort(short shortArg)  - 
asUnsignedInteger
public static long asUnsignedInteger(int intArg)  - 
partialIntToByteArray
public static byte[] partialIntToByteArray(int number, int length)  - 
getLong
public static long getLong(byte[] inBuffer, int pos)  - 
extractBit
public static boolean extractBit(byte byteValue, int bitMask)  - 
boolToBit
public static byte boolToBit(boolean flag, int bit)  - 
bytesToHex
 
 -