Here you can find the source of unsigned(byte value)
public static short unsigned(byte value)
//package com.java2s; //License from project: Apache License public class Main { public static short unsigned(byte value) { return (short) (value & 0xFF); }/* w w w. j a v a 2 s. c om*/ public static int unsigned(short value) { return value & 0xFFFF; } public static long unsigned(int value) { return value & 0xFFFFFFFFL; } }