Here you can find the source of cast(byte b)
private static int cast(byte b)
//package com.java2s; public class Main { private static int cast(byte b) { if (b >= 0) { return b; }/* w w w.ja va2 s .c om*/ return 256 + b; } }