public int readUnsignedShort ( final JBBPByteOrder byteOrder ) throws IOException { final int b0 = this . read ( ) ; if ( b0 < 0 ) { throw new EOFException ( ) ; } final int b1 = this . read ( ) ; if ( b1 < 0 ) { throw new EOFException ( ) ; } return byteOrder == JBBPByteOrder . BIG_ENDIAN ? ( b0 << 8 ) | b1 : ( b1 << 8 ) | b0 ; }
Read a unsigned short value from the stream .