|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--helliker.id3.BinaryParser
Constructor Summary | |
BinaryParser()
|
Method Summary | |
static boolean |
bitSet(byte b,
int pos)
Tests to see if the bit at postion pos is set in byte b |
static byte[] |
convertToBytes(int num)
Convert the integer passed to a array of 4 bytes (32-bits). |
static int |
convertToDecimal(byte b,
int start,
int end)
Convert a portion of a byte to an integer. |
static int |
convertToInt(byte[] b)
Convert an array of bytes into an integer. |
static byte[] |
convertToSynchsafeBytes(int num)
Converts the integer passed to an array of bytes as specified in section 6.2 of the id3v2 specification. |
static int |
convertToSynchsafeInt(byte[] b)
Converts the byte array to a synchsafe integer as specified in section 6.2 of the id3v2 specification. |
static boolean |
matchPattern(byte b,
java.lang.String pattern)
This function takes an 8 character string representation of a byte in binary mode. |
static byte |
setBit(byte b,
int location)
Sets the bit at the specified location in the byte given. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BinaryParser()
Method Detail |
public static boolean bitSet(byte b, int pos)
b
- the byte to testpos
- a value between 0 (least significant bit) and 7
(most significant bit) indicating the position to test
public static boolean matchPattern(byte b, java.lang.String pattern)
b
- the byte to testpattern
- the 8 character long pattern to test the byte
public static int convertToDecimal(byte b, int start, int end)
b
- the byte to convert fromstart
- the starting bitend
- the ending bit
public static int convertToInt(byte[] b)
b
- the array of bytes
public static int convertToSynchsafeInt(byte[] b)
b
- the array of bytes
public static byte[] convertToBytes(int num)
num
- the integer to convert
public static byte[] convertToSynchsafeBytes(int num)
num
- the integer to convert
public static byte setBit(byte b, int location)
b
- the byte to set the index inlocation
- the index to set in b
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |