Android examples for File Input Output:Byte Array Convert
Convert byte array To Long by shifting left
//package com.java2s; public class Main { public static long bytesToLong(byte[] b) { long result = 0; for (int i = 0; i < 8; i++) { result <<= 8;/* w w w . java2 s . co m*/ result |= (b[i] & 0xFF); } return result; } }