org.sunflow.system

Class ByteUtil


public class ByteUtil
extends java.lang.Object

Method Summary

static int
floatToHalf(float f)
static byte[]
get2Bytes(int i)
static byte[]
get4Bytes(int i)
static byte[]
get4BytesInv(int i)
static byte[]
get8Bytes(long i)
static int
toInt(byte in0, byte in1, byte in2, byte in3)
static int
toInt(byte[] in)
static int
toInt(byte[] in, int ofs)
static long
toLong(byte[] in)

Method Details

floatToHalf

public static final int floatToHalf(float f)

get2Bytes

public static final byte[] get2Bytes(int i)

get4Bytes

public static final byte[] get4Bytes(int i)

get4BytesInv

public static final byte[] get4BytesInv(int i)

get8Bytes

public static final byte[] get8Bytes(long i)

toInt

public static final int toInt(byte in0,
                              byte in1,
                              byte in2,
                              byte in3)

toInt

public static final int toInt(byte[] in)

toInt

public static final int toInt(byte[] in,
                              int ofs)

toLong

public static final long toLong(byte[] in)