public byte[] read_binary() throws OtpErlangDecodeException {
        int tag;
        int len;
        byte[] bin;

        tag = read1skip_version();

        if (tag != OtpExternal.binTag) {
            throw new OtpErlangDecodeException(
                    "Wrong tag encountered, expected " + OtpExternal.binTag
                            + ", got " + tag);
        }

        len = read4BE();

        bin = new byte[len];
        this.readN(bin);

        return bin;
    }
public byte [ ] read_binary ( ) throws OtpErlangDecodeException { int tag ; int len ; byte [ ] bin ; tag = read1skip_version ( ) ; if ( tag != OtpExternal . binTag ) { throw new OtpErlangDecodeException ( "Wrong tag encountered, expected " + OtpExternal . binTag + ", got " + tag ) ; } len = read4BE ( ) ; bin = new byte [ len ] ; this . readN ( bin ) ; return bin ; }
Read an Erlang binary from the stream.

@return a byte array containing the value of the binary.

@exception OtpErlangDecodeException
if the next term in the stream is not a binary.