byte_array_to_long() public static method

public static byte_array_to_long ( byte b, bool unsigned ) : long
b byte
unsigned bool
return long
Example #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);
            }
        }
Example #2
0
 public long read_long(bool unsigned)
 {
     byte[] b = read_integer_byte_array();
     return(OtpInputStream.byte_array_to_long(b, unsigned));
 }