I have a problem:
The file called Outtest.java reads the file called "test.out" which
contains:
A
B
C
D
E
but when I type java Outtest, this shows:
A
B
C
D
E
and never returns prompt. I need type Control-C and this returns the
prompt. This is Outtest.java:
import java.io.*;
public class Outtest
{
public static void main( String[] args )
{
int c;
try
{
FileInputStream fin = new FileInputStream("test.out");
DataInputStream lin = new DataInputStream(fin);
for(;;)
{
try
{
while((c = lin.read()) != -1)
{
System.out.write( c );
}
}
catch(Exception e)
{
;
}
}
}
catch(Exception e)
{
;
}
}
}
thanks!
Carlos Alberto Roman Zamitiz
Departamento de Ingenieria en Computacion, Facultad de Ingenieria UNAM
[EMAIL PROTECTED]