Android examples for File Input Output:Byte Array Convert
Convert int To Byte array
//package com.java2s; public class Main { public static byte[] intToByte(int value) { byte[] result = new byte[4]; result[0] = (byte) (value >> 24); result[1] = (byte) (value >> 16); result[2] = (byte) (value >> 8); result[3] = (byte) (value); return result; }/*from w ww . ja v a2s .c o m*/ }