| Method from org.apache.poi.hdf.extractor.Utils Detail: |
public static int convertBytesToInt(byte[] array,
int offset) {
return convertBytesToInt(array[offset + 3], array[offset + 2], array[offset + 1], array[offset]);
}
|
public static int convertBytesToInt(byte firstByte,
byte secondByte,
byte thirdByte,
byte fourthByte) {
int firstInt = 0xff & firstByte;
int secondInt = 0xff & secondByte;
int thirdInt = 0xff & thirdByte;
int fourthInt = 0xff & fourthByte;
return (firstInt < < 24) | (secondInt < < 16) | (thirdInt < < 8) | fourthInt;
}
|
public static short convertBytesToShort(byte firstByte,
byte secondByte) {
return (short)convertBytesToInt((byte)0, (byte)0, firstByte, secondByte);
}
|
public static short convertBytesToShort(byte[] array,
int offset) {
return convertBytesToShort(array[offset + 1], array[offset]);
}
|
public static int convertUnsignedByteToInt(byte b) {
return (0xff & b);
}
|
public static char getUnicodeCharacter(byte[] array,
int offset) {
return (char)convertBytesToShort(array, offset);
}
|