import java.io.*;
public class LatRandomAccessFileApp1
{
public void printLine(String fileName)
throws IOException
{
RandomAccessFile raf = new RandomAccessFile(fileName, "r");
String line;
while((line = raf.readLine()) != null)
{
System.out.println(line);
}
raf.close();
}
public static void main(String[] args)
{
String fileName = args[0];
LatRandomAccessFileApp1 app = new LatRandomAccessFileApp1();
try
{
app.printLine(fileName);
}
catch(IOException ioe)
{
ioe.printStackTrace();
}
}
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment