com.lowagie.text.rtf.document
Class RtfCodePage

java.lang.Object
  extended by com.lowagie.text.rtf.RtfElement
      extended by com.lowagie.text.rtf.document.RtfCodePage
All Implemented Interfaces:
RtfBasicElement, RtfExtendedElement

public class RtfCodePage
extends RtfElement
implements RtfExtendedElement

The RtfCodePage class allows different code pages to be used in the rtf document. Currently always ansi / ansicpg1252

Version:
$Id: RtfCodePage.java 2808 2007-05-30 10:58:16Z psoares33 $
Author:
Mark Hall (mhall@edu.uni-klu.ac.at), Thomas Bickel (tmb99@inode.at)

Field Summary
private static byte[] ANSI
          Constant for ansi encoded rtf documents
private static byte[] ANSI_CODEPAGE
          Constant for the ansi codepage
 
Fields inherited from class com.lowagie.text.rtf.RtfElement
document, inHeader, inTable
 
Fields inherited from interface com.lowagie.text.rtf.RtfBasicElement
CLOSE_GROUP, COMMA_DELIMITER, DELIMITER, OPEN_GROUP, TWIPS_FACTOR
 
Constructor Summary
RtfCodePage(RtfDocument doc)
          Construct an RtfCodePage
 
Method Summary
 byte[] write()
          Deprecated. replaced by writeContent(OutputStream)
 void writeContent(java.io.OutputStream out)
          unused
 byte[] writeDefinition()
          Deprecated. replaced by writeDefinition(OutputStream)
 void writeDefinition(java.io.OutputStream result)
          Writes the selected codepage
 
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lowagie.text.rtf.RtfBasicElement
setInHeader, setInTable, setRtfDocument
 

Field Detail

ANSI

private static final byte[] ANSI
Constant for ansi encoded rtf documents


ANSI_CODEPAGE

private static final byte[] ANSI_CODEPAGE
Constant for the ansi codepage

Constructor Detail

RtfCodePage

public RtfCodePage(RtfDocument doc)
Construct an RtfCodePage

Parameters:
doc - The RtfDocument this RtfCodePage belongs to
Method Detail

write

public byte[] write()
Deprecated. replaced by writeContent(OutputStream)

unused

Specified by:
write in interface RtfBasicElement
Specified by:
write in class RtfElement
Returns:
An empty byte array

writeContent

public void writeContent(java.io.OutputStream out)
                  throws java.io.IOException
unused

Specified by:
writeContent in interface RtfBasicElement
Overrides:
writeContent in class RtfElement
Throws:
java.io.IOException

writeDefinition

public byte[] writeDefinition()
Deprecated. replaced by writeDefinition(OutputStream)

Writes the selected codepage to a byte array

Specified by:
writeDefinition in interface RtfExtendedElement
Returns:
Byte array with the current codepage

writeDefinition

public void writeDefinition(java.io.OutputStream result)
                     throws java.io.IOException
Writes the selected codepage

Specified by:
writeDefinition in interface RtfExtendedElement
Throws:
java.io.IOException