public int getUInt16(int index) throws IOException
    {
        validateIndex(index, 2);

        if (_isMotorolaByteOrder) {
            // Motorola - MSB first
            return (getByte(index    ) << 8 & 0xFF00) |
                   (getByte(index + 1)      & 0xFF);
        } else {
            // Intel ordering - LSB first
            return (getByte(index + 1) << 8 & 0xFF00) |
                   (getByte(index    )      & 0xFF);
        }
    }
public int getUInt16 ( int index ) throws IOException { validateIndex ( index , 2 ) ; if ( _isMotorolaByteOrder ) { return ( getByte ( index ) << 8 & 0xFF00 ) | ( getByte ( index + 1 ) & 0xFF ) ; } else { return ( getByte ( index + 1 ) << 8 & 0xFF00 ) | ( getByte ( index ) & 0xFF ) ; } }
Returns an unsigned 16-bit int calculated from two bytes of data at the specified index.

@param index position within the data buffer to read first byte
@return the 16 bit int value, between 0x0000 and 0xFFFF
@throws IOException the buffer does not contain enough bytes to service the request, or index is negative