|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.net.ftp.shell.CommandFile
class CommandFile
FTP source command script. Manages the input stream for a single command script.
Copyright ©2007 by David R. Tribble, all rights reserved.
Permission is granted to any person or entity except those designated by
by the United States Department of State as a terrorist, or terrorist
government or agency, to use and distribute this source code provided
that the original copyright notice remains present and unaltered.
CommandLexer
Field Summary | |
---|---|
(package private) int |
m_lineNo
Source line number of the next input character. |
(package private) static java.lang.String |
REV
Revision information. |
Constructor Summary | |
---|---|
CommandFile(java.io.Reader in,
java.io.PrintWriter out,
CommandFile prev)
Constructor. |
Method Summary | |
---|---|
(package private) java.lang.String |
getSourceName()
Retrieve the name of this source stream (the command script). |
(package private) CommandFile |
pop()
Terminate this input source stream. |
(package private) int |
readChar()
Read the next input characters from this input source stream. |
(package private) void |
setSourceName(java.lang.String name)
Establish the name of this source stream (the command script). |
(package private) void |
unReadChar(int ch)
Push back an input character from the source script. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String REV
int m_lineNo
Constructor Detail |
---|
CommandFile(java.io.Reader in, java.io.PrintWriter out, CommandFile prev)
in
- Input source stream.out
- Error/warning message output stream.prev
- Previous source stream that includes this one.Method Detail |
---|
void setSourceName(java.lang.String name)
name
- Name of the input stream. This is usually a filename, but it can be any
kind of identification for the source stream.java.lang.String getSourceName()
CommandFile pop()
int readChar() throws java.io.IOException
m_lineNo
to reflect the source line number of
the returned character.
Each newline (end of line) sequence (CR, LF, CR/LF) is translated into a single newline character ('\n'). A newline character ('\n') is always returned as the last character before the end of the input stream, even if the stream does not contain a final newline sequence.
java.io.IOException
void unReadChar(int ch)
readChar()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |