public class CRC { public static void main(String[] args) { try { if (args.length == 1){ Encoding tmp = new Encoding(args[0]); System.out.println(args[0] + tmp.getFcsChars()); } else if (args.length == 3){ String tmp = args[0] + Character.toString((char) Integer.parseInt(args[1])) + Character.toString((char) Integer.parseInt(args[2])); Decoding d = new Decoding(tmp); System.out.println(d.getCheck()); } } catch (ArrayIndexOutOfBoundsException e){ System.out.println("Za mało argumentów"); } } }