Class ByteUtil
- java.lang.Object
-
- org.opendaylight.lispflowmapping.lisp.util.ByteUtil
-
public final class ByteUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static char[]
HEX_ARRAY
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static short
asUnsignedByte(byte byteArg)
static long
asUnsignedInteger(int intArg)
static int
asUnsignedShort(short shortArg)
static byte
boolToBit(boolean flag, int bit)
static java.lang.String
bytesToHex(byte[] bytes, int length)
static boolean
extractBit(byte byteValue, int bitMask)
static int
getInt(byte[] inBuffer, int pos)
static long
getLong(byte[] inBuffer, int pos)
static int
getPartialInt(byte[] inBuffer)
static short
getShort(byte[] inBuffer, int pos)
static int
getUnsignedByte(byte[] inBuffer, int pos)
static int
getUnsignedByte(java.nio.ByteBuffer inBuffer)
static int
getUnsignedByte(java.nio.ByteBuffer inBuffer, int pos)
static int
getUnsignedShort(byte[] inBuffer, int pos)
static int
getUnsignedShort(java.nio.ByteBuffer inBuffer, int pos)
static byte[]
partialIntToByteArray(int number, int length)
-
-
-
Method Detail
-
getUnsignedByte
public static int getUnsignedByte(byte[] inBuffer, int pos)
-
getUnsignedByte
public static int getUnsignedByte(java.nio.ByteBuffer inBuffer, int pos)
-
getUnsignedByte
public static int getUnsignedByte(java.nio.ByteBuffer inBuffer)
-
getUnsignedShort
public static int getUnsignedShort(byte[] inBuffer, int pos)
-
getUnsignedShort
public static int getUnsignedShort(java.nio.ByteBuffer inBuffer, int pos)
-
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
public static java.lang.String bytesToHex(byte[] bytes, int length)
-
-