|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--picturedream.utils.BinaryUtils
Title: PictureDream
Description:
Copyright: Copyright (c) 2003 MRoc
Organisation: MRoc Audiosolutions
| Field Summary | |
static int[] |
BITS8
some static fields to mask bits |
static boolean |
DEBUG
set this value to false to prevent console output |
private static java.lang.String[] |
HEX
|
| Constructor Summary | |
BinaryUtils()
|
|
| Method Summary | |
static int |
makeIntFrom2BytesBigEndian(byte[] bytes,
int offset)
makes an int from two bytes from an bytearray from the given offset |
static int |
makeIntFrom2BytesLittleEndian(byte[] bytes,
int offset)
makes an int from two bytes from an bytearray from the given offset |
static int |
makeIntFrom4BytesLittleEndian(byte[] bytes,
int offset)
returns an int made out of four bytes (32bit) from an bytearray from the given offset |
static void |
put2BytesToBufferLittleEndian(int value,
ByteBuffer buffer)
puts the given int as 2 bytes to the buffer, in little endian align, means lowest byte first (reverse representation from memory) |
static void |
put2BytesToBufferLittleEndian(short value,
byte[] buffer,
int offset)
puts the given int as 2 bytes to the buffer, in little endian align, means lowest byte first (reverse representation from memory) |
static void |
put4BytesToBufferBigEndian(int value,
byte[] buffer,
int offset)
puts the given int as 4 bytes to the buffer, in big endian align, means highest byte first (normal representation like in memory) |
static void |
put4BytesToBufferBigEndian(int value,
ByteBuffer buffer)
puts the given int as 4 bytes to the buffer, in big endian align, means highest byte first (normal representation like in memory) |
static void |
put4BytesToBufferLittleEndian(int value,
byte[] buffer,
int offset)
puts the given int as 4 bytes to the given buffer at the given offset |
static void |
put4BytesToBufferLittleEndian(int value,
ByteBuffer buffer)
puts the given int as 4 bytes to the buffer, in little endian align, means lowest byte first (reverse representation from memory) |
static java.lang.String |
toHexString(byte b)
returns the unsigned byte as hex string left filled with zeros, (means allways two characters) |
static java.lang.String |
toHexString4(int i)
returns the unsigned int as hex string left filled with zeros, (means allways four characters) |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int[] BITS8
private static final java.lang.String[] HEX
public static boolean DEBUG
| Constructor Detail |
public BinaryUtils()
| Method Detail |
public static void put4BytesToBufferLittleEndian(int value,
ByteBuffer buffer)
public static void put4BytesToBufferLittleEndian(int value,
byte[] buffer,
int offset)
public static void put4BytesToBufferBigEndian(int value,
ByteBuffer buffer)
public static void put4BytesToBufferBigEndian(int value,
byte[] buffer,
int offset)
public static void put2BytesToBufferLittleEndian(int value,
ByteBuffer buffer)
public static void put2BytesToBufferLittleEndian(short value,
byte[] buffer,
int offset)
public static java.lang.String toHexString(byte b)
public static java.lang.String toHexString4(int i)
public static int makeIntFrom4BytesLittleEndian(byte[] bytes,
int offset)
public static int makeIntFrom2BytesLittleEndian(byte[] bytes,
int offset)
public static int makeIntFrom2BytesBigEndian(byte[] bytes,
int offset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||