Here you can find the source of unsigned(byte b)
public static short unsigned(byte b)
//package com.java2s; public class Main { public static short unsigned(byte b) { return (short) (b < 0 ? b & 0xFF : b); }// w w w. j a v a 2s . c o m }