Android examples for File Input Output:Byte Array Convert
Convert byte array To Int by shifting left
//package com.java2s; public class Main { public static int bytesToInt(byte[] b) { int result = 0; for (int i = 0; i < 4; i++) { result <<= 8;//from w w w . j a v a 2s .c o m if (i < b.length) { result |= (b[i] & 0xFF); } } return result; } }