Note that this is a lossy conversion since RTF's model of text does not exactly correspond with LightText's.
java.io.OutputStream
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| pack-priv int | |
| pack-priv Dictionary | |
| public static final String | |
| public static final float | |
| public static final Color | defaultRTFColor
The default color, used for text without an explicit color attribute. |
| pack-priv int | |
| pack-priv Dictionary | |
| pack-priv static final char[] | |
| private static final Object | |
| pack-priv MutableAttributeSet | |
| pack-priv int[] | |
| pack-priv OutputStream | |
| pack-priv int | |
| pack-priv Dictionary | |
| protected static RTFGenerator. | |
| pack-priv int | |
| private Segment |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| private static Object | |
| protected void | checkControlWord(MutableAttributeSet currentAttributes, AttributeSet newAttributes, RTFAttribute word)
|
| protected void | checkControlWords(MutableAttributeSet currentAttributes, AttributeSet newAttributes, RTFAttribute[] words, int domain)
|
| protected void | checkNumericControlWord(MutableAttributeSet currentAttributes, AttributeSet newAttributes, Object attrName, String controlWord, float dflt, float scale)
|
| protected static int | convertCharacter(int[] conversion, char ch)
Takes a char and a conversion table (an int[] in the current implementation, but conversion tables should be treated as an opaque type) and returns the corresponding byte value (as an int, since bytes are signed). |
| private static boolean | |
| public void | |
| private Style | |
| private Integer | |
| pack-priv static int[] | |
| pack-priv static int[] | outputConversionFromTranslationTable(char[] table)
Takes a translation table (a 256-element array of characters) and creates an output conversion table for use by convertCharacter(). |
| protected void | |
| protected void | |
| protected void | |
| private void | |
| pack-priv void | updateCharacterAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean updateStyleChanges)
|
| pack-priv void | updateParagraphAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean emitStyleChanges)
|
| pack-priv void | updateSectionAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean emitStyleChanges)
|
| public void | |
| public void | |
| public void | |
| public void | |
| public static void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void |
| afterKeyword | back to summary |
|---|---|
| pack-priv boolean afterKeyword | |
| colorCount | back to summary |
|---|---|
| pack-priv int colorCount | |
| colorTable | back to summary |
|---|---|
| pack-priv Dictionary<Object, Integer> colorTable | |
| defaultFontFamily | back to summary |
|---|---|
| public static final String defaultFontFamily | |
| defaultFontSize | back to summary |
|---|---|
| public static final float defaultFontSize | |
| defaultRTFColor | back to summary |
|---|---|
| public static final Color defaultRTFColor The default color, used for text without an explicit color attribute. | |
| fontCount | back to summary |
|---|---|
| pack-priv int fontCount | |
| fontTable | back to summary |
|---|---|
| pack-priv Dictionary<String, Integer> fontTable | |
| hexdigits | back to summary |
|---|---|
| pack-priv static final char[] hexdigits | |
| MagicToken | back to summary |
|---|---|
| private static final Object MagicToken | |
| outputAttributes | back to summary |
|---|---|
| pack-priv MutableAttributeSet outputAttributes | |
| outputConversion | back to summary |
|---|---|
| pack-priv int[] outputConversion | |
| outputStream | back to summary |
|---|---|
| pack-priv OutputStream outputStream | |
| styleCount | back to summary |
|---|---|
| pack-priv int styleCount | |
| styleTable | back to summary |
|---|---|
| pack-priv Dictionary<AttributeSet, Integer> styleTable | |
| textKeywords | back to summary |
|---|---|
| protected static RTFGenerator. | |
| unicodeCount | back to summary |
|---|---|
| pack-priv int unicodeCount | |
| workingSegment | back to summary |
|---|---|
| private Segment workingSegment | |
| RTFGenerator | back to summary |
|---|---|
| public RTFGenerator(OutputStream to) | |
| approximationForUnicode | back to summary |
|---|---|
| pack-priv String approximationForUnicode(char ch) | |
| attrDiff | back to summary |
|---|---|
| private static Object attrDiff(MutableAttributeSet oldAttrs, AttributeSet newAttrs, Object key, Object dfl) | |
| checkControlWord | back to summary |
|---|---|
| protected void checkControlWord(MutableAttributeSet currentAttributes, AttributeSet newAttributes, RTFAttribute word) throws IOException | |
| checkControlWords | back to summary |
|---|---|
| protected void checkControlWords(MutableAttributeSet currentAttributes, AttributeSet newAttributes, RTFAttribute[] words, int domain) throws IOException | |
| checkNumericControlWord | back to summary |
|---|---|
| protected void checkNumericControlWord(MutableAttributeSet currentAttributes, AttributeSet newAttributes, Object attrName, String controlWord, float dflt, float scale) throws IOException | |
| convertCharacter | back to summary |
|---|---|
| protected static int convertCharacter(int[] conversion, char ch) Takes a char and a conversion table (an int[] in the current implementation, but conversion tables should be treated as an opaque type) and returns the corresponding byte value (as an int, since bytes are signed). | |
| equalArraysOK | back to summary |
|---|---|
| private static boolean equalArraysOK(Object a, Object b) | |
| examineElement | back to summary |
|---|---|
| public void examineElement(Element el) | |
| findStyle | back to summary |
|---|---|
| private Style findStyle(AttributeSet a) | |
| findStyleNumber | back to summary |
|---|---|
| private Integer findStyleNumber(AttributeSet a, String domain) | |
| outputConversionForName | back to summary |
|---|---|
| pack-priv static int[] outputConversionForName(String name) throws IOException | |
| outputConversionFromTranslationTable | back to summary |
|---|---|
| pack-priv static int[] outputConversionFromTranslationTable(char[] table) Takes a translation table (a 256-element array of characters) and creates an output conversion table for use by convertCharacter(). | |
| resetCharacterAttributes | back to summary |
|---|---|
| protected void resetCharacterAttributes(MutableAttributeSet currentAttributes) throws IOException | |
| resetParagraphAttributes | back to summary |
|---|---|
| protected void resetParagraphAttributes(MutableAttributeSet currentAttributes) throws IOException | |
| resetSectionAttributes | back to summary |
|---|---|
| protected void resetSectionAttributes(MutableAttributeSet currentAttributes) throws IOException | |
| tallyStyles | back to summary |
|---|---|
| private void tallyStyles(AttributeSet a) | |
| updateCharacterAttributes | back to summary |
|---|---|
| pack-priv void updateCharacterAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean updateStyleChanges) throws IOException | |
| updateParagraphAttributes | back to summary |
|---|---|
| pack-priv void updateParagraphAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean emitStyleChanges) throws IOException | |
| updateSectionAttributes | back to summary |
|---|---|
| pack-priv void updateSectionAttributes(MutableAttributeSet current, AttributeSet newAttributes, boolean emitStyleChanges) throws IOException | |
| writeBegingroup | back to summary |
|---|---|
| public void writeBegingroup() throws IOException | |
| writeCharacter | back to summary |
|---|---|
public void writeCharacter(char ch) throws IOException
| |
| writeControlWord | back to summary |
|---|---|
| public void writeControlWord(String keyword) throws IOException | |
| writeControlWord | back to summary |
|---|---|
| public void writeControlWord(String keyword, int arg) throws IOException | |
| writeDocument | back to summary |
|---|---|
| public static void writeDocument(Document d, OutputStream to) throws IOException | |
| writeDocumentProperties | back to summary |
|---|---|
| pack-priv void writeDocumentProperties(Document doc) throws IOException | |
| writeEndgroup | back to summary |
|---|---|
| public void writeEndgroup() throws IOException | |
| writeLineBreak | back to summary |
|---|---|
| public void writeLineBreak() throws IOException | |
| writeParagraphElement | back to summary |
|---|---|
| public void writeParagraphElement(Element el) throws IOException | |
| writeRawString | back to summary |
|---|---|
| public void writeRawString(String str) throws IOException | |
| writeRTFHeader | back to summary |
|---|---|
| public void writeRTFHeader() throws IOException | |
| writeRTFTrailer | back to summary |
|---|---|
| public void writeRTFTrailer() throws IOException | |
| writeText | back to summary |
|---|---|
| public void writeText(Segment s) throws IOException | |
| writeText | back to summary |
|---|---|
| public void writeText(String s) throws IOException | |
| writeTextElement | back to summary |
|---|---|
| public void writeTextElement(Element el) throws IOException | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| character | back to summary |
|---|---|
| public char character | |
| keyword | back to summary |
|---|---|
| public String keyword | |
| CharacterKeywordPair | back to summary |
|---|---|
| pack-priv CharacterKeywordPair() | |