Here you can find the source of unsignedUpcast(short s)
public static int unsignedUpcast(short s)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { public static int unsignedUpcast(short s) { return s & 0xFFFF; }// www . j a v a 2 s . c om public static int unsignedUpcast(byte b) { return b & 0xFF; } }