de.betabeans.scroogexhtml
Class ScroogeXHTML

java.lang.Object
  |
  +--de.betabeans.scroogexhtml.ScroogeXHTMLBase
        |
        +--de.betabeans.scroogexhtml.ScroogeXHTMLMain
              |
              +--de.betabeans.scroogexhtml.ScroogeXHTML
All Implemented Interfaces:
java.io.Serializable

public class ScroogeXHTML
extends ScroogeXHTMLMain

ScroogeXHTML - a RTF to XHTML converter class. This JavaBean(tm) converts RTF to XHTML. It provides:
- a method to convert a RTF stream to a XHTML stream
- a method to convert a RTF file to a XHTML file


This simple example converts a RTF file to HTML:
 ScroogeXHTML scroogeXHTML1 = new ScroogeXHTML();
 String rtfFile = "c:/windows/desktop/test.rtf";
 String htmlFile = "c:/windows/desktop/test.html";
 scroogeXHTML1.convert(rtfFile, htmlFile);
 

For a description of the properties, please go to the ScroogeXHTMLBase documentation.

Author:
Michael
See Also:
Serialized Form

Fields inherited from class de.betabeans.scroogexhtml.ScroogeXHTMLMain
pbReader, profilerStart
 
Fields inherited from class de.betabeans.scroogexhtml.ScroogeXHTMLBase
abortConversion, addOuterHTML, afterTextConversionListeners, BETABEANS_URL, CONTENT_TYPE_8859_1, convertFontBGColor, convertFontColor, convertFontHLColor, convertFontName, convertFontSize, convertFontStyle, convertHyperlinks, convertSpaces, curFontCSet, curFontName, curFontNr, curFontType, DEFAULT_FONT_COLOR, DEFAULT_FONT_NAME, DEFAULT_FONT_SIZE, defaultFontColor, defaultFontName, defaultFontNr, defaultFontSize, DOCTYPE_XHTML_10_STRICT, DOCTYPE_XHTML_10_TRANSITIONAL, documentTitle, headTags, HTML_OPEN, hyperlinkListeners, includeDefaultFontStyle, includeDocType, includeXMLDeclaration, isDebugging, logLevel, logListeners, metaAuthor, metaContentType, metaDate, metaDateAuto, metaDescription, metaGenerator, metaKeywords, metaTags, parser, processed, processFontstyle, progressListeners, reader, replaceFonts, SCROOGEXHTML_NAME, SCROOGEXHTML_VERSION, showMessages, styleSheetInclude, styleSheetLink, writer, xhtmlStrict, XML_DECLARATION
 
Constructor Summary
ScroogeXHTML()
          Constructor for the ScroogeXHTML object
 
Method Summary
 boolean convert(java.io.PushbackReader inReader, java.io.BufferedWriter outWriter)
          convert RTF stream to XHTML stream note: input stream will be closed by ScroogeXHTML, but the output stream needs to be closed by the calling program
 java.lang.String convert(java.lang.String rtf)
          convert RTF string to XHTML string
 boolean convert(java.lang.String rtfFileName, java.lang.String htmlFileName)
          convert RTF file to XHTML file
 
Methods inherited from class de.betabeans.scroogexhtml.ScroogeXHTMLMain
convert
 
Methods inherited from class de.betabeans.scroogexhtml.ScroogeXHTMLBase
addAfterTextConversionListener, addHyperlinkListener, addLogListener, addProgressListener, debug, debug, getAbortConversion, getAddOuterHTML, getConvertFontBGColor, getConvertFontColor, getConvertFontHLColor, getConvertFontName, getConvertFontSize, getConvertFontStyle, getConvertHyperlinks, getConvertSpaces, getDefaultFontColor, getDefaultFontName, getDefaultFontSize, getDefaultFontStyleDefinition, getDocumentTitle, getHeadTags, getIncludeDefaultFontStyle, getIncludeDocType, getIncludeXMLDeclaration, getLogLevel, getMetaAuthor, getMetaContentType, getMetaDate, getMetaDateAuto, getMetaDescription, getMetaGenerator, getMetaKeywords, getMetaTags, getProcessed, getReplaceFonts, getShowMessages, getStyleSheetInclude, getStyleSheetLink, getVersion, getXhtmlStrict, isDebugMode, log, nameAndVersion, notifyProgress, removeAfterTextConversionListener, removeHyperlinkListener, removeLogListener, removeProgressListener, setAbortConversion, setAddOuterHTML, setConvertFontBGColor, setConvertFontColor, setConvertFontHLColor, setConvertFontName, setConvertFontSize, setConvertFontStyle, setConvertHyperlinks, setConvertSpaces, setDebugMode, setDefaultFontColor, setDefaultFontName, setDefaultFontSize, setDocumentTitle, setHeadTags, setIncludeDefaultFontStyle, setIncludeDocType, setIncludeXMLDeclaration, setLogLevel, setMetaAuthor, setMetaContentType, setMetaDate, setMetaDateAuto, setMetaDescription, setMetaGenerator, setMetaKeywords, setMetaTags, setReplaceFonts, setShowMessages, setStyleSheetInclude, setStyleSheetLink, setVersion, setXhtmlStrict, textElementToXHTML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScroogeXHTML

public ScroogeXHTML()
Constructor for the ScroogeXHTML object
Method Detail

convert

public boolean convert(java.io.PushbackReader inReader,
                       java.io.BufferedWriter outWriter)
convert RTF stream to XHTML stream note: input stream will be closed by ScroogeXHTML, but the output stream needs to be closed by the calling program
Parameters:
inReader - the input stream
outWriter - the output stream
Returns:
true = success

convert

public java.lang.String convert(java.lang.String rtf)
convert RTF string to XHTML string
Parameters:
rtf - the input RTF string
Returns:
XHTML result

convert

public boolean convert(java.lang.String rtfFileName,
                       java.lang.String htmlFileName)
convert RTF file to XHTML file
Parameters:
rtfFileName - RTF file name
htmlFileName - XHTML file name
Returns:
true = success