read_integer_byte_array() public method

public read_integer_byte_array ( ) : byte[]
return byte[]
Beispiel #1
0
        /**
         * Create an Erlang integer from a stream containing an integer encoded in
         * Erlang external format.
         *
         * @param buf
         *                the stream containing the encoded value.
         *
         * @exception OtpErlangDecodeException
         *                    if the buffer does not contain a valid external
         *                    representation of an Erlang integer.
         */
        public OtpErlangLong(OtpInputStream buf)
        {
            byte[] b = buf.read_integer_byte_array();

            try
            {
                val = OtpInputStream.byte_array_to_long(b, false);
            }
            catch (OtpErlangDecodeException)
            {
                bigVal = new BigInteger(b);
            }
        }
        /**
         * Create an Erlang integer from a stream containing an integer encoded in
         * Erlang external format.
         *
         * @param buf
         *                the stream containing the encoded value.
         *
         * @exception OtpErlangDecodeException
         *                    if the buffer does not contain a valid external
         *                    representation of an Erlang integer.
         */
        public OtpErlangLong(OtpInputStream buf)
        {
            byte[] b = buf.read_integer_byte_array();

            try
            {
                val = OtpInputStream.byte_array_to_long(b, false);
            }
            catch (OtpErlangDecodeException)
            {
                bigVal = new BigInteger(b);
            }
        }
Beispiel #3
0
        /**
         * Create an Erlang integer from a stream containing an integer encoded in
         * Erlang external format.
         *
         * @param buf
         *                the stream containing the encoded value.
         *
         * @exception OtpErlangDecodeException
         *                    if the buffer does not contain a valid external
         *                    representation of an Erlang integer.
         */
        public OtpErlangLong(OtpInputStream buf)
        {
            byte[] b = buf.read_integer_byte_array();

            val = OtpInputStream.byte_array_to_long(b, false);
        }