// Create a buffered data input stream from file
in = new DataInputStream(new BufferedInputStream(new FileInputStream(journalFile)));
}
catch (IOException e)
{
throw new JournalException("Cannot open journal file : "+journalFile.getAbsolutePath(),e);
}
try
{
AbstractJournalOperation op;
while ((op = JournalRecovery.readJournalOperation(in)) != null)
{
System.out.println(op);
if (op instanceof CommitOperation)
System.out.println("----------------------------------------------------------------------");
}
}
finally
{
try
{
in.close();
}
catch (IOException e)
{
throw new JournalException("Cannot close journal file : "+journalFile.getAbsolutePath(),e);
}
}
}