Android examples for java.lang:Byte
convert Int To Byte
//package com.java2s; import java.math.BigInteger; public class Main { static byte convertIntToByte2(int x) { final byte[] test = BigInteger.valueOf(x).toByteArray(); if (test.length > 0) { return test[0]; }/*from ww w.ja va2 s. c o m*/ return 0x00; } }