|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpmp.Macroprocessor.Component
pmp.InputOutput
pmp.io.FileIO
public class FileIO
Implements filesystem InputOutput.
Title: PMP: Macroprocessor
Description: Java macroprocessor
Copyright: Copyright (c) 2005
Field Summary | |
---|---|
protected boolean |
closeableOut
Should be output closed when nott needed. |
protected java.io.Writer |
output
Current output |
Fields inherited from class pmp.InputOutput |
---|
ERR_OUTPUT, NULL_INPUT, NULL_OUTPUT, RANDOM_INPUT, STD_INPUT, STD_OUTPUT |
Constructor Summary | |
---|---|
FileIO(Macroprocessor mp,
java.lang.String outputFile,
boolean assign)
|
Method Summary | |
---|---|
void |
closeFiles(boolean force)
Close output file. |
void |
debugHandler(java.lang.String debugmessage)
|
void |
errorHandler(java.lang.String error)
This method should produce some kind of error message and then raise FatalParserException . |
InputSource |
getDefaultInput()
This class doesn't provide default input source. |
InputSource |
getInput(java.lang.String inputFile)
Return new Input object for given source. |
void |
noticeHandler(java.lang.String noticemessage)
|
void |
setOutput(java.lang.String outputFile)
Redirects output of macroprocessor to specified location. |
void |
warningHandler(java.lang.String warning)
|
void |
write(java.lang.String str)
Writes given string into output writer. |
Methods inherited from class pmp.Macroprocessor.Component |
---|
error, getMP, getMPAnalyzer, getMPIO, getMPIQ, getMPMacros, notice, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.io.Writer output
protected boolean closeableOut
output
closed when nott needed. Set to
false
when using stdio.
Constructor Detail |
---|
public FileIO(Macroprocessor mp, java.lang.String outputFile, boolean assign)
Method Detail |
---|
public InputSource getInput(java.lang.String inputFile)
InputOutput
getInput
in class InputOutput
inputFile
- name of source
public InputSource getDefaultInput()
getDefaultInput
in class InputOutput
null
public void setOutput(java.lang.String outputFile)
InputOutput
setOutput
in class InputOutput
outputFile
- name of outputpublic void write(java.lang.String str)
write
in class InputOutput
str
- string to be written to outputpublic void closeFiles(boolean force)
force
- close file even if it is marked as not closeable.public void errorHandler(java.lang.String error)
InputOutput
FatalParserException
.
errorHandler
in class InputOutput
error
- error messagepublic void warningHandler(java.lang.String warning)
warningHandler
in class InputOutput
public void noticeHandler(java.lang.String noticemessage)
noticeHandler
in class InputOutput
public void debugHandler(java.lang.String debugmessage)
debugHandler
in class InputOutput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |