FS.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author cteam94
*/
public class FS {
map.put('A', ".-");
map.put('B', "-...");
map.put('C', "-.-.");
map.put('D', "-..");
map.put('E', ".");
map.put('F', "..-.");
map.put('G', "--.");
map.put('H', "....");
map.put('I', "..");
map.put('J', ".---");
map.put('K', "-.-");
map.put('L', ".-..");
map.put('M', "--");
map.put('N', "-.");
map.put('O', "---");
map.put('P', ".--.");
map.put('Q', "--.-");
map.put('R', ".-.");
map.put('S', "...");
map.put('T', "-");
map.put('U', "..-");
map.put('V', "...-");
map.put('W', ".--");
map.put('X', "-..-");
map.put('Y', "-.--");
map.put('Z', "--..");
map.put('_', "..--");
map.put(',', ".-.-");
map.put('.', "---.");
map.put('?', "----");
Map
<String, Character
> map2
= new HashMap
<String, Character
>();
map2.put(s, c);
}
while(readLine(br, map, map2));
}
if (orig == null) return false;
StringBuilder a = new StringBuilder();
for (int i = 0; i < orig.length(); i++) {
String temp
= map.
get(orig.
charAt(i
)); a.append(temp);
b[i] = temp.length();
}
int counter = 0;
for (int i = b.length - 1; i >= 0; i--) {
StringBuilder c = new StringBuilder();
for (int j = 0; j < b[i]; j++) {
c.append(s.charAt(counter));
counter++;
}
System.
out.
print(map2.
get(c.
toString())); }
return true;
}
}