List of usage examples for org.apache.poi.util LittleEndian getUShort
public static int getUShort(byte[] data)
From source file:com.argo.hwp.utils.HwpStreamReader.java
License:Open Source License
/** * unsigned 2 byte// w ww. jav a2s . c om * * @return * @throws IOException */ public int uint16() throws IOException { if (ensure(2) == 0) return -1; return LittleEndian.getUShort(buf); }
From source file:com.argo.hwp.utils.HwpStreamReader.java
License:Open Source License
/** * unsigned 2 byte array//w ww.java 2s. c o m * * @param i * @return * @throws IOException */ public int[] uint16(int i) throws IOException { if (i <= 0) throw new IllegalArgumentException(); int[] uints = new int[i]; for (int ii = 0; ii < i; ii++) { if (ensure(2) == 0) throw new EOFException(); uints[ii] = LittleEndian.getUShort(buf); } return uints; }