All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.log.LogFile

java.lang.Object
   |
   +----pinball.log.LogFile

public class LogFile
extends Object
Opens a log file for reading or writing.


Variable Index

 o filename
File name of log file.
 o reader
Input file.
 o writer
Output file.

Constructor Index

 o LogFile(String, char)
Opens a log file for reading or writting.

Method Index

 o getReader()
Get the reading part of the file, if opened for reading.
 o getWriter()
Get the writing part of the file, if opened for writing.
 o reading()
Set the log file for reading.
 o writing()
Set the log file for writing.

Variables

 o filename
 private String filename
File name of log file.

 o reader
 private BufferedReader reader
Input file.

 o writer
 private DataOutputStream writer
Output file.

Constructors

 o LogFile
 public LogFile(String name,
                char how) throws IOException
Opens a log file for reading or writting.

Parameters:
name - file name of the log file.
how - how the file is to be opened. w for write, r for read.

Methods

 o reading
 private void reading() throws IOException
Set the log file for reading.

 o writing
 private void writing() throws IOException
Set the log file for writing.

 o getReader
 public BufferedReader getReader()
Get the reading part of the file, if opened for reading.

Returns:
The reading part of the file.
 o getWriter
 public DataOutputStream getWriter()
Get the writing part of the file, if opened for writing.

Returns:
The writing part of the file.

All Packages  Class Hierarchy  This Package  Previous  Next  Index