hi.i have developed a english-greek translator but i have a problem with showing up the greek characters.so i changed this part:
public void loadData() {
InputStream is = this.getClass().getResourceAsStream("/files/names.txt");
int c;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
while((c = is.read()) != -1) {
if (c != '\n') {
baos.write(c);
}
else {
String s = baos.toString();
decode(s.substring(0, s.length()-1));
baos.reset();
}
}
// Read ended
if (baos.toString().length() > 0) {
decode(baos.toString());
}
}
catch(IOException ioex) {
System.out.println("Problems while reading: "+ioex);
ioex.printStackTrace();
}
}
with InputStreamReader.so now my query manger is like this:

package hello;

import java.io.InputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Vector;
import java.util.Enumeration;

public class QueryManager {

private Hashtable names; // Structure: key = String name
// value = Vector Surnames (a vector of strings)

public QueryManager() {
names = new Hashtable();
}

static String readInput() {
StringBuffer buffer = new StringBuffer();
try {
FileInputStream fis = new FileInputStream("names.txt");
InputStreamReader isr = new InputStreamReader(fis,"UTF8");
Reader in = new BufferedReader(isr);
int ch;
while ((ch = in.read()) > -1) {
buffer.append((char)ch);
}
in.close();
return buffer.toString();
}catch (IOException e){
e.printStackTrace();
return null;
}
}

private void decode(String s) {
Vector surnames = new Vector();
String name, surname;
int firstSpace, space; // this will give us the position of the space string
firstSpace = s.indexOf(" ");
name = s.substring(0, firstSpace);

System.out.println("Word: "+name);

while ( (space = s.indexOf(" ", firstSpace+1)) != -1 ) {
surname = s.substring(firstSpace+1, space);
System.out.println("Answer: "+surname);

// we add the surname to the surname vector
surnames.addElement(surname);

firstSpace = space;
}
names.put(name, surnames);
// we add an entry in the hash table.
}

public String searchSurnames(String name) {
Vector v = (Vector) names.get(name);
String s = "";

if (v == null) {
s = null;
}
else {

for (Enumeration e = v.elements(); e.hasMoreElements(); ) {
s += (String) e.nextElement()+"\n";
}
}
return s;
}
}
unfortunately when i try to run the program i get errors that i cannot correct.i am new in java so it may be sth easy.....whats wrong with the code?