protected int readShort ( int offset , byte [ ] data ) { int result = 0 ; int i = offset + m_offset ; for ( int shiftBy = 0 ; shiftBy < 16 ; shiftBy += 8 ) { result |= ( ( data [ i ] & 0xff ) ) << shiftBy ; ++ i ; } return result ; }
Read a two byte integer from the data .