return (short) ( (val[offset + 0] << 8) + val[offset + 1]);
}
private final long makeInt(byte[] val, int offset, boolean isle) throws BinaryParseException {
if (val.length < offset + 4)
throw new BinaryParseException("Offset out of range when reading Int.");
if (isle) {
return ( (val[offset + 3] << 24) + (val[offset + 2] << 16) + (val[offset + 1] << 8) + val[offset + 0]);
}
return ( (val[offset + 0] << 24) + (val[offset + 1] << 16) + (val[offset + 2] << 8) + val[offset + 3]);
}