Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hilbert II - JAVA-Packages - Principia Mathematica II
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meyling.principia.io
Class TextFileReader

    java.lang.Object
      com.meyling.principia.io.TextFileReader

public class TextFileReader
extends Object

Wrapper for the class `FileReader`.

Version:
  $Revision: 1.7 $
Author:
  Michael Meyling

Constructor Summary
`TextFileReader(String inputName)` Creates a `TextFileReader` object.

Method Summary
`void` | `close()` Closes input.
`String` | `getInFileName()` Get name of input file.
`String` | `getLine()` Get currently read line.
`int` | `getLineNumber()` Get currently read line number.
`String` | `readLine()` For simple reading a complete line of the input file.
`void` | `unReadLine()` Undos the `readLine()` method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TextFileReader

    public TextFileReader(String inputName)
                   throws IOException

  Creates a `TextFileReader` object.

Parameters:
  `inputName` - name of the input file
Throws:
  `IOException` - if the buffered reader couldn't be created

Method Detail

### close

    public void close()

  Closes input.

### readLine

    public String readLine()
                    throws IOException

  For simple reading a complete line of the input file. The line is stored in the class attribut `line`. Comments are ignored.

  Returns:
    eingelesene Zeile
  Throws:
    `IOException` - wenn ein Lesefehler auftrat

### unReadLine

    public void unReadLine()
                    throws IllegalStateException

  Undos the `readLine()` method. Only one `readLine()` call can be cancelled. Further calls lead to an IllegalStateException. A following `readLine()` call gives the last result again.

  Throws:
    `IllegalStateException` - if undo isn't allowed any more

### getLine

    public String getLine()

  Get currently read line.

  Returns:
    currently read line

### getLineNumber

    public int getLineNumber()

  Get currently read line number.

  Returns:
    currently read line number

### getInFileName

    public String getInFileName()

  Get name of input file.

  Returns:
    name of input file

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hilbert II - JAVA-Packages - Principia Mathematica II
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

©left GNU General Public Licence All Rights Reserved.