import java.io.*;
public class FileInputStreamTest
{
public static void main(String args[])
{
try
{
FileInputStream fis = new FileInputStream("test.txt");
int i;
System.out.println("ASCII value of the character:");
while((i=fis.read()) != -1)
{
System.out.print(i+" : ");
System.out.println((char)i);
}
}
catch (FileNotFoundException fnfe)
{
fnfe.printStackTrace();
}
catch (IOException io)
{
io.printStackTrace();
}
}
}