import java.io.*;
public class read {
public static void main(String args[]) throws IOException {
String thisLine;
String[] fullText = new String[10];
int counter = 0;
FileInputStream fis = new FileInputStream("test.dat");
int c=0;
while((c=fis.read)!=-1)
{
System.out.println((char)c);
}
DataInputStream myInput = new DataInputStream(fis);
while ((thisLine = myInput.getchar()) != null) {
System.out.println(thisLine);
counter++;
fullText[counter] = thisLine;
}
}
}