public final class RtfStringConverter
extends java.lang.Object
Converts java Strings according to RTF conventions.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).
Modifier and Type | Method and Description |
---|---|
java.lang.String |
escape(java.lang.String str)
Escapes a String as required by the RTF spec.
|
static RtfStringConverter |
getInstance()
use this to get an object of this class
|
void |
writeRtfString(java.io.Writer w,
java.lang.String str)
Write given String to given Writer, converting characters as required by
RTF spec
|
public static RtfStringConverter getInstance()
public void writeRtfString(java.io.Writer w, java.lang.String str) throws java.io.IOException
w
- Writerstr
- String to be writtenjava.io.IOException
- for I/O problemspublic java.lang.String escape(java.lang.String str)
str
- String to be escapedCopyright 1999-2017 The Apache Software Foundation. All Rights Reserved.