rtf
Class RtfUtil

java.lang.Object
  extended by rtf.RtfUtil
All Implemented Interfaces:
initAndProcess, JavaText

public class RtfUtil
extends java.lang.Object
implements JavaText, initAndProcess


Field Summary
static java.lang.String HEADER
           
 
Fields inherited from interface rtf.JavaText
javaReservedWords
 
Constructor Summary
RtfUtil()
           
 
Method Summary
static java.lang.String formatCurlyBracesAndBackslashes(java.lang.String s)
          Returns a string with curly braces and backslashes in RTF format.
static java.lang.String getBold(java.lang.String s)
          Returns a string in bold RTF format.
static java.lang.String getItalic(java.lang.String s)
          Returns a string in italic RTF format.
static java.lang.String getPar()
          Returns a paragraph break in RTF format.
static java.lang.String getPlain(java.lang.String s)
          Returns a string in plain RTF format.
static java.lang.String getTab()
          Returns a tab in RTF format.
 void javaToRtf(java.io.BufferedReader br, java.io.BufferedWriter _bw)
          Converts a Java source file to a RTF file.
 void javaToRtf(java.io.File javaFile, java.io.File rtfFile)
          Converts a Java source file to a RTF file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER

public static final java.lang.String HEADER
See Also:
Constant Field Values
Constructor Detail

RtfUtil

public RtfUtil()
Method Detail

javaToRtf

public void javaToRtf(java.io.BufferedReader br,
                      java.io.BufferedWriter _bw)
Converts a Java source file to a RTF file.

Parameters:
br - is the BufferedReader to read from.
_bw - is the BufferedWriter to write to.

javaToRtf

public void javaToRtf(java.io.File javaFile,
                      java.io.File rtfFile)
Converts a Java source file to a RTF file.

Parameters:
javaFile - is the Java source file to convert.
rtfFile - is the RTF file to convert to.

getItalic

public static java.lang.String getItalic(java.lang.String s)
Returns a string in italic RTF format.

Parameters:
s - is the string to format.
Returns:
A string in italic RTF format.

getBold

public static java.lang.String getBold(java.lang.String s)
Returns a string in bold RTF format.

Parameters:
s - is the string to format.
Returns:
A string in bold RTF format.

getPlain

public static java.lang.String getPlain(java.lang.String s)
Returns a string in plain RTF format.

Parameters:
s - is the string to format.
Returns:
A string in plain RTF format.

getPar

public static java.lang.String getPar()
Returns a paragraph break in RTF format.

Returns:
A paragraph break in RTF format.

getTab

public static java.lang.String getTab()
Returns a tab in RTF format.

Returns:
A tab in RTF format.

formatCurlyBracesAndBackslashes

public static java.lang.String formatCurlyBracesAndBackslashes(java.lang.String s)
Returns a string with curly braces and backslashes in RTF format. Any displayed curly braces or backslashes in RTF must be preceded by a "\" since "{", "}", and "\" are used for control characters.

Parameters:
s - is the string to format.
Returns:
A string with curly braces in RTF format.