Class RtfStringConverter
java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfStringConverter
Converts java Strings according to RTF conventions.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Characterprivate static final RtfStringConverterprivate static final Characterprivate static final Characterprivate static final Map -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionEscapes a String as required by the RTF spec.static RtfStringConverteruse this to get an object of this classvoidwriteRtfString(Writer w, String str) Write given String to given Writer, converting characters as required by RTF spec
-
Field Details
-
INSTANCE
-
SPECIAL_CHARS
-
DBLQUOTE
-
QUOTE
-
SPACE
-
-
Constructor Details
-
RtfStringConverter
private RtfStringConverter()singleton pattern
-
-
Method Details
-
getInstance
use this to get an object of this class- Returns:
- the singleton instance
-
writeRtfString
Write given String to given Writer, converting characters as required by RTF spec- Parameters:
w- Writerstr- String to be written- Throws:
IOException- for I/O problems
-
escape
Escapes a String as required by the RTF spec.- Parameters:
str- String to be escaped- Returns:
- the escaped string
-