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
-
EppInputStream(String)
-
-
backtrack(int)
- Moves the input pointer back to the specified position.
-
bufferSubString(int, int)
- Returns a string from the specified range.
-
fileName()
- Returns the file name of the current stream.
-
getc()
- Reads and returns one character.
-
isEof()
- Returns true if the input stream reached EOF and false otherwise.
-
lineNumber()
- Returns the current line number.
-
peekc()
- Peeks and returns one character ahead.
-
pointer()
- Returns the current position in the input stream.
-
ungetc(char)
- Returns one character to the input stream.
EppInputStream
public EppInputStream(String filename)
peekc
public char peekc()
- Peeks and returns one character ahead.
getc
public char getc()
- Reads and returns one character.
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.
isEof
public boolean isEof()
- Returns true if the input stream reached EOF and false otherwise.
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
lineNumber
public int lineNumber()
- Returns the current line number.
fileName
public String fileName()
- Returns the file name of the current stream.
bufferSubString
public String bufferSubString(int begin,
int end)
- Returns a string from the specified range.
backtrack
public void backtrack(int newp)
- Moves the input pointer back to the specified position.
All Packages Class Hierarchy This Package Previous Next Index