code: public int peek1() throws OtpErlangDecodeException {
          int i;
          try {
              i = super.buf[super.pos];
              if (i < 0) {
                  i += 256;
              }
  
              return i;
          } catch (final Exception e) {
              throw new OtpErlangDecodeException("Cannot read from input stream");
          }
      }
docs: Look ahead one position in the stream without consuming the byte found
  there.
  
  @return the next byte in the stream, as an integer.
  
  @exception OtpErlangDecodeException
  if the next byte cannot be read.