public OtpErlangPort read_port ( ) throws OtpErlangDecodeException { String node ; int id ; int creation ; int tag ; tag = read1skip_version ( ) ; if ( tag != OtpExternal . portTag && tag != OtpExternal . newPortTag ) { throw new OtpErlangDecodeException ( "Wrong tag encountered, expected " + OtpExternal . portTag + " or " + OtpExternal . newPortTag + ", got " + tag ) ; } node = read_atom ( ) ; id = read4BE ( ) ; if ( tag == OtpExternal . portTag ) creation = read1 ( ) ; else creation = read4BE ( ) ; return new OtpErlangPort ( tag , node , id , creation ) ; }
Read an Erlang port from the stream .