FileDocCategorySizeDatePackage
Utils.javaAPI DocApache Poi 3.0.12202Mon Jan 01 18:55:24 GMT 2007org.apache.poi.hdf.extractor

Utils

public class Utils extends Object
Comment me
author
Ryan Ackley

Fields Summary
Constructors Summary
Methods Summary
public static intconvertBytesToInt(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 intconvertBytesToInt(byte[] array, int offset)

        return convertBytesToInt(array[offset + 3], array[offset + 2], array[offset + 1], array[offset]);
    
public static shortconvertBytesToShort(byte firstByte, byte secondByte)

        return (short)convertBytesToInt((byte)0, (byte)0, firstByte, secondByte);
    
public static shortconvertBytesToShort(byte[] array, int offset)

        return convertBytesToShort(array[offset + 1], array[offset]);
    
public static intconvertUnsignedByteToInt(byte b)

        return (0xff & b);
    
public static chargetUnicodeCharacter(byte[] array, int offset)

      return (char)convertBytesToShort(array, offset);