forked from kalmar/DALGLI0
Zaktualizuj 'CRC.java'
This commit is contained in:
parent
477d8a349c
commit
b23027f544
7
CRC.java
7
CRC.java
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user