public int readUnsignedShortAsInt ( int off ) { this . buffer . position ( off ) ; int b1 = ( 0x000000FF & ( this . buffer . get ( ) ) ) ; int b2 = ( 0x000000FF & ( this . buffer . get ( ) ) ) ; int val = b1 << 8 | b2 ; return val ; }
Read an unsigned short at specified offset as a int