cdm/src/main/java/ucar/unidata/io/Swap.java
static public short swapShort(byte[] b, int offset) {
        // 2 bytes
        int low  = b[offset] & 0xff;
        int high = b[offset + 1] & 0xff;
        return (short) (high << 8 | low);
    }
static public short swapShort(byte[] b, int offset) {
        // 2 bytes
        int low  = b[offset] & 0xff;
        int high = b[offset + 1] & 0xff;
        return (short) (high << 8 | low);
    }
Returns the short resulting from swapping 2 bytes at a specified
offset in a byte array.

@param  b       the byte array
@param  offset  the offset of the first byte
@return         the short represented by the bytes
<code>b[offset+1], b[offset]</code>