1
0
forked from kalmar/DALGLI0

Zaktualizuj 'CRC.java'

This commit is contained in:
Rafał Dąbkowski 2018-06-27 14:57:14 +00:00
parent 477d8a349c
commit b23027f544

View File

@ -1,11 +1,12 @@
public class CRC {
public static void main(String[] args) {
try {
if (args[1].equals("-e")){
if (args.length == 1){
Encoding tmp = new Encoding(args[0]);
System.out.println(args[0] + tmp.getFcsChars());
} else if (args[1].equals("-d")){
Decoding d = new Decoding(args[0]);
} 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){