public class CmsPrintStreamReport extends CmsHtmlReport
Keep in mind that you are resposible for closing the stream calling the close()
method when the report is no longer used.
LINEBREAK, LINEBREAK_TRADITIONALFORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE| 构造器和说明 |
|---|
CmsPrintStreamReport(java.io.PrintStream printStream,
java.util.Locale locale,
boolean writeHtml)
Constructs a new report using the provided locale for the output language.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Closes the print stream.
|
void |
finish()
Finishes the report, closing the stream.
|
protected java.lang.String |
getLineBreak()
Returns the correct line break notation depending on the output style of this report.
|
java.lang.String |
getReportUpdate()
Updates this report, this processes all new output added since
the last call to this method.
|
void |
print(java.lang.String value,
int format)
Prints a String to the report, using the indicated formatting.
|
void |
println()
Adds a line break to the report.
|
void |
println(java.lang.Throwable t)
Adds an Exception to the report, ensuring that the Exception content is
processed to generate a valid output esp. for HTML pages.
|
void |
start()
Starts the report.
|
isWriteHtmladdError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, removeSiteRoot, resetRuntime, setLastEntryTimepublic CmsPrintStreamReport(java.io.PrintStream printStream,
java.util.Locale locale,
boolean writeHtml)
printStream - the print stream to write the output tolocale - the locale to use for the output languagewriteHtml - decides if the report should write clear text or html codepublic void close()
Has to be called after the report has finished.
public void finish()
public java.lang.String getReportUpdate()
I_CmsReportThis is only required in case the output is written to a HTML page, if the shell output is used, this will just return an empty String.
getReportUpdate 在接口中 I_CmsReportgetReportUpdate 在类中 CmsHtmlReportI_CmsReport.getReportUpdate()public void print(java.lang.String value,
int format)
A_CmsReport
Use the constants starting with FORMAT from this interface
to indicate which formatting to use.
print 在类中 CmsHtmlReportvalue - the message container to addformat - the formatting to use for the outputA_CmsReport.print(java.lang.String, int)public void println()
I_CmsReportprintln 在接口中 I_CmsReportprintln 在类中 CmsHtmlReportI_CmsReport.println()public void println(java.lang.Throwable t)
I_CmsReportThe exception will be stored and the output will later be processed in a special way.
println 在接口中 I_CmsReportprintln 在类中 CmsHtmlReportt - the exception to addI_CmsReport.println(java.lang.Throwable)public void start()
protected java.lang.String getLineBreak()
CmsHtmlReportgetLineBreak 在类中 CmsHtmlReportCmsHtmlReport.getLineBreak()