Android Byte Array to Long Convert getLong5(byte[] b, int offset)

Here you can find the source of getLong5(byte[] b, int offset)

Description

get Long

Declaration

public static long getLong5(byte[] b, int offset) 

Method Source Code

//package com.java2s;

public class Main {

    public static long getLong5(byte[] b, int offset) {
        long ret = (b[offset] & 0xffL) << 32;
        ret += ((b[offset + 1] & 0xffL)) << 24;
        ret += ((b[offset + 2] & 0xffL) << 16);
        ret += ((b[offset + 3] & 0xffL) << 8);
        ret += (b[offset + 4] & 0xffL);
        return ret;
    }//from ww  w . ja  va  2  s  . c  om
}

Related

  1. getLong(byte[] bb, int index)
  2. getLong(byte[] buf, boolean bigEndian)
  3. getLong(byte[] buf, int pos, boolean bigEndian)
  4. getLong(byte[] bytes)
  5. getLong4(byte[] b, int offset)
  6. getLongFromByteArray(final byte[] bytes)
  7. toLong(byte[] b, int pos)
  8. toLong(byte[] b, int pos, int width)
  9. toLong(byte[] src)