Here you can find the source of ubyte2int(final byte x)
public static int ubyte2int(final byte x)
//package com.java2s; //License from project: Open Source License public class Main { /**/*ww w . j a v a 2 s.c o m*/ * Interprets the value of x as an unsigned byte, and returns it as integer. For example, * ubyte2int(0xFF) == 255, not -1. */ public static int ubyte2int(final byte x) { return x & 0xFF; } }