|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jasp.io.TextStream
Allows you to read and write text files
Constructor Summary | |
TextStream(java.lang.String name)
|
|
TextStream(java.lang.String name,
int iomode)
|
|
TextStream(java.lang.String name,
int iomode,
boolean unicode)
|
Method Summary | |
void |
Close()
Close an open TextStream file. |
boolean |
getAtEndOfLine()
Read-only property that returns True if the file pointer immediately precedes the end-of-line marker in a TextStream file; False if it is not. |
boolean |
getAtEndOfStream()
Read-only property that returns True if the file pointer is at the end of a TextStream file; False if it is not. |
int |
getColumn()
Read-only property that returns the column number of the current character position in a TextStream file. |
int |
getLine()
Read-only property that returns the current line number in a TextStream file. |
java.lang.String |
Read(int characters)
Reads a specified number of characters from a TextStream file and returns the resulting string. |
java.lang.String |
ReadAll()
Reads an entire TextStream file and returns the resulting string. |
java.lang.String |
ReadLine()
Reads an entire line(up to,but not including,the newline character)from a TextStream file and returns the result- ing string. |
void |
Skip(int characters)
Skips a specified number of characters when reading a TextStream file. |
void |
SkipLine()
Skips the next line when reading a TextStream file. |
void |
Write(java.lang.String str)
Writes a string to a TextStream file. |
void |
WriteBlankLines(int lines)
Writes a specified number of newline characters to a TextStream file. |
void |
WriteLine()
Writes a specified string and newline character to a TextStream file. |
void |
WriteLine(java.lang.String string)
Writes a specified string and newline character to a TextStream file. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TextStream(java.lang.String name)
public TextStream(java.lang.String name, int iomode)
public TextStream(java.lang.String name, int iomode, boolean unicode)
Method Detail |
public boolean getAtEndOfLine()
public boolean getAtEndOfStream() throws java.lang.Exception
public int getColumn()
public int getLine()
public void Close() throws java.lang.Exception
public java.lang.String Read(int characters) throws java.lang.Exception
characters
- Number of characters you want to read from
the file.public java.lang.String ReadAll() throws java.lang.Exception
public java.lang.String ReadLine() throws java.lang.Exception
public void Skip(int characters) throws java.lang.Exception
characters
- Number of characters to skip when reading a file.public void SkipLine() throws java.lang.Exception
public void Write(java.lang.String str) throws java.lang.Exception
public void WriteBlankLines(int lines) throws java.lang.Exception
lines
- Number of newline characters you want to
write to the file.public void WriteLine() throws java.lang.Exception
public void WriteLine(java.lang.String string) throws java.lang.Exception
string
- The text you want to write to the file.
If omitted, a newline character is written to the file.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |