Here you can find the source of toByte(int byteValue)
public static byte toByte(int byteValue)
//package com.java2s; public class Main { public static byte toByte(int byteValue) { return (byte) (byteValue & 0x000000FF); }// www . ja v a 2 s . com }