private static String getHexString(int dec) {
    	if(dec<0 || dec>255) {
    		return "00";
    	} else {
    		return Character.toString(hexNums[(int)Math.floor(dec/16)]) + Character.toString(hexNums[dec%16]);
    	}
    }