Here you can find the source of intToOneByte(int i)
public static byte[] intToOneByte(int i)
//package com.java2s; //License from project: Apache License public class Main { public static byte[] intToOneByte(int i) { byte[] b = new byte[1]; b[0] = (byte) (i & 0xff); return b; }/*from w w w . j a va 2 s.c om*/ }