Here you can find the source of intToByte(int myInt)
Parameter | Description |
---|---|
myInt | integer to convert |
public static byte intToByte(int myInt)
//package com.java2s; //License from project: Creative Commons License public class Main { /**/* w w w .j a v a 2 s.c om*/ * Converts integer to byte value. * * @param myInt integer to convert * @return converted byte */ public static byte intToByte(int myInt) { return (byte) (myInt & 0xff); } }