All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class epp.EppInputStream

java.lang.Object
   |
   +----epp.EppInputStream

public class EppInputStream
extends Object
The EppInputStream class is an input stream class specialized for EPP, that reads an input file character-by-character. It supports features such as backtracking and counting line numbers. Future versions will also process unicode escapes with this class.

Plug-ins may extend the openEppInputStream method of Epp to modify the input stream class EPP uses.

NOTE:
In order to make the implementation simpler, the border of each line is defined as follows. (Beginning of line is '\n' for Unix and Win, '\r' for Mac.)

    Unix:  ...\n...
              ^
    Mac:   ...\r...
              ^
    Win    ...\r\n...
                ^

See Also:
openEppInputStream

Constructor Index

 o EppInputStream(String)

Method Index

 o backtrack(int)
Moves the input pointer back to the specified position.
 o bufferSubString(int, int)
Returns a string from the specified range.
 o fileName()
Returns the file name of the current stream.
 o getc()
Reads and returns one character.
 o isEof()
Returns true if the input stream reached EOF and false otherwise.
 o lineNumber()
Returns the current line number.
 o peekc()
Peeks and returns one character ahead.
 o pointer()
Returns the current position in the input stream.
 o ungetc(char)
Returns one character to the input stream.

Constructors

 o EppInputStream
 public EppInputStream(String filename)

Methods

 o peekc
 public char peekc()
Peeks and returns one character ahead.

 o getc
 public char getc()
Reads and returns one character.

 o ungetc
 public void ungetc(char c)
Returns one character to the input stream. If the character to return is different from the character read, an error occurs.

 o isEof
 public boolean isEof()
Returns true if the input stream reached EOF and false otherwise.

 o pointer
 public int pointer()
Returns the current position in the input stream. The return value may be used as an argument to the backtrack method.

See Also:
backtrack
 o lineNumber
 public int lineNumber()
Returns the current line number.

 o fileName
 public String fileName()
Returns the file name of the current stream.

 o bufferSubString
 public String bufferSubString(int begin,
                               int end)
Returns a string from the specified range.

 o backtrack
 public void backtrack(int newp)
Moves the input pointer back to the specified position.


All Packages  Class Hierarchy  This Package  Previous  Next  Index