Here you can find the source of toUnsignedInt(byte b)
public static int toUnsignedInt(byte b)
//package com.java2s; //License from project: Apache License public class Main { public static int toUnsignedInt(byte b) { return (b >= 0) ? b : 256 + b; }// ww w .j a va 2 s .co m public static int toUnsignedInt(short s) { return (s >= 0) ? s : 65536 + s; } }