I need help quickly. I am still having problems reading from a file one character at a time. Nothing seems to be working. I must read a file and store each character into an array. The problem I am having is getting it to read an character. I can read the bytes, but not characters. Here is some sample code. Please be very specific cause I am completely dumb when it comes to
java!
FileInputStream fis = new FileInputStream(fileName);
FileOutputStream fos = new FileOutputStream("outfile.txt");
int c;
int i =0;
InputStreamReader isr = new InputStreamReader(fis);
while (( c = isr.read(someChars)) != -1) {
fos.write(c);
System.out.println(c);
i++;
This is what someone suggestted I use, but now the characters are not being written to the outfile. Thanks for any help you can give.