code: public int read2BE() throws OtpErlangDecodeException {
          final byte[] b = new byte[2];
          try {
              super.read(b);
          } catch (final IOException e) {
              throw new OtpErlangDecodeException("Cannot read from input stream");
          }
          return (b[0] << 8 & 0xff00) + (b[1] & 0xff);
      }
docs: Read a two byte big endian integer from the stream.
  
  @return the bytes read, converted from big endian to an integer.
  
  @exception OtpErlangDecodeException
  if the next byte cannot be read.