Java Long Number Create toLong(byte[] readBuffer, int o)

Here you can find the source of toLong(byte[] readBuffer, int o)

Description

to Long

License

Open Source License

Declaration

public static long toLong(byte[] readBuffer, int o) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long toLong(byte[] readBuffer, int o) {
        return (((long) readBuffer[0] << 56) + ((long) (readBuffer[1] & 255) << 48)
                + ((long) (readBuffer[2] & 255) << 40) + ((long) (readBuffer[3] & 255) << 32)
                + ((long) (readBuffer[4] & 255) << 24) + ((readBuffer[5] & 255) << 16)
                + ((readBuffer[6] & 255) << 8) + ((readBuffer[7] & 255) << 0));
    }//from  w w  w.j av  a 2  s.  c o  m

    public static long toLong(byte[] readBuffer) {
        return toLong(readBuffer, 0);
    }
}

Related

  1. toLong(byte[] in)
  2. toLong(byte[] input)
  3. toLong(byte[] key)
  4. toLong(byte[] memory, int index)
  5. toLong(byte[] n)
  6. toLong(byte[] si, boolean isReverseOrder)
  7. toLong(byte[] src)
  8. toLong(byte[] src, int srcPos)
  9. toLong(byte[] v)