Java Long Number Create toLong(byte[] buf)

Here you can find the source of toLong(byte[] buf)

Description

to Long

License

Apache License

Declaration

static long toLong(byte[] buf) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static long toLong(byte[] buf) {
        int n = 0;
        for (byte b : buf) {
            n = (n << 8) + (b & 0xff);
        }/*from w  w  w.  j a v  a 2 s  .co  m*/

        return n;
    }
}

Related

  1. toLong(byte[] b)
  2. toLong(byte[] b)
  3. toLong(byte[] b)
  4. toLong(byte[] b, int off, boolean bigEndian)
  5. toLong(byte[] buf)
  6. toLong(byte[] buf, int off)
  7. toLong(byte[] buf, int pos)
  8. toLong(byte[] byteArray)
  9. toLong(byte[] bytes)