/** * Warning: the result is negative in Java if UInt16 > 0x7fff * @return next UInt16 value as a short * @throws IOException */ public short readUInt16AsShort() throws IOException { return in.readShort(); }
/** * Warning: the result is negative in Java if UInt16 > 0x7fff * @return next UInt16 value as a short * @throws IOException */ public short readUInt16AsShort() throws IOException { return in.readShort(); }
public short readInt16() throws IOException { return in.readShort(); }
public short readInt16() throws IOException { return in.readShort(); }
@Override public short readShort() { try { return dataInputStream.readShort(); } catch (IOException e) { throw new RuntimeIOException(e); } }
@Override public short readShort() { try { return dataInputStream.readShort(); } catch (IOException e) { throw new RuntimeIOException(e); } }
private static byte [] getByteArray(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); byte [] value = new byte[fieldLength]; ledis.readFully(value); return value; } }
private static int getInt(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); if (fieldLength != 4) { throw new IllegalStateException("Int required but length was " + fieldLength); } return ledis.readInt(); }
private static long getLong(LittleEndianDataInputStream ledis) throws IOException { short fieldLength = ledis.readShort(); if (fieldLength != 8) { throw new IllegalStateException("Long required but length was " + fieldLength); } return ledis.readLong(); }