code: public int readUnsignedShort() throws IOException {
          int byte1 = in.read();
          int byte2 = in.read();
  
          if (byte2 < 0) {
              throw new EOFException();
          }
  
          return (byte2 << 8) + byte1;
      }
docs: Reads a two byte unsigned {@code short} from the underlying
  input stream in little endian order, low byte first.
  
  @return the int value of the unsigned short read.
  @throws EOFException if the end of the underlying input stream
  has been reached
  @throws IOException  if the underlying stream throws an IOException.