Here you can find the source of toUnsignedByte(int value)
public static int toUnsignedByte(int value)
//package com.java2s; //License from project: Apache License public class Main { private static final int UNSIGNED_BYTE_MAX = 0xff; public static int toUnsignedByte(int value) { return value &= UNSIGNED_BYTE_MAX; }/*from ww w . java 2 s . c o m*/ }