import java.io.*;

public class ReadFileWithRAFShort
{
  public static void main( String[] args )
  {
    RandomAccessFile f = null;
    
    try
    {
      f = new RandomAccessFile( "EastOfJava.txt", "r" );
    
      for ( String line; (line=f.readLine()) != null; )
        System.out.println( line );
    }
    catch ( IOException e )
    {
      System.err.println( "Ein/Ausgabe-Probleme." );
    }
    finally
    {
      if ( f != null )
        try { f.close(); } catch ( IOException e ) { e.printStackTrace(); }
    }
  }
}
