Package com.lowagie.text.rtf.document
Class RtfInfoElement
- java.lang.Object
-
- com.lowagie.text.rtf.RtfElement
-
- com.lowagie.text.rtf.document.RtfInfoElement
-
- All Implemented Interfaces:
RtfBasicElement,RtfElementInterface
public class RtfInfoElement extends RtfElement
Stores one information group element. Valid elements are author, title, subject, keywords, producer and creationdate.- Version:
- $Id: RtfInfoElement.java 3580 2008-08-06 15:52:00Z howard_s $
- Author:
- Mark Hall (Mark.Hall@mail.room3b.eu), Thomas Bickel (tmb99@inode.at)
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcontentThe content of this RtfInfoElementprivate static byte[]INFO_AUTHORConstant for the author elementprivate static byte[]INFO_CREATION_DATEConstant for the creationdate elementprivate static byte[]INFO_KEYWORDSConstant for the keywords elementprivate static byte[]INFO_PRODUCERConstant for the producer elementprivate static byte[]INFO_SUBJECTConstant for the subject elementprivate static byte[]INFO_TITLEConstant for the title elementprivate intinfoTypeThe type of this RtfInfoElement.-
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
Constructors Constructor Description RtfInfoElement(RtfDocument doc, Meta meta)Constructs a RtfInfoElement based on the given Meta object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.StringconvertDate(java.lang.String date)Converts a date from the format used by iText to the format required by rtf.
iText: EEE MMM dd HH:mm:ss zzz yyyy - rtf: \\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ssvoidwriteContent(java.io.OutputStream result)Writes the content of one RTF information element.-
Methods inherited from class com.lowagie.text.rtf.RtfElement
intToByteArray, isInTable, setInHeader, setInTable, setRtfDocument
-
-
-
-
Field Detail
-
INFO_AUTHOR
private static final byte[] INFO_AUTHOR
Constant for the author element
-
INFO_SUBJECT
private static final byte[] INFO_SUBJECT
Constant for the subject element
-
INFO_KEYWORDS
private static final byte[] INFO_KEYWORDS
Constant for the keywords element
-
INFO_TITLE
private static final byte[] INFO_TITLE
Constant for the title element
-
INFO_PRODUCER
private static final byte[] INFO_PRODUCER
Constant for the producer element
-
INFO_CREATION_DATE
private static final byte[] INFO_CREATION_DATE
Constant for the creationdate element
-
infoType
private int infoType
The type of this RtfInfoElement. The values from Element.INFO_ELEMENT_NAME are used.
-
content
private java.lang.String content
The content of this RtfInfoElement
-
-
Constructor Detail
-
RtfInfoElement
public RtfInfoElement(RtfDocument doc, Meta meta)
Constructs a RtfInfoElement based on the given Meta object- Parameters:
doc- The RtfDocument this RtfInfoElement belongs tometa- The Meta object this RtfInfoElement is based on
-
-
Method Detail
-
writeContent
public void writeContent(java.io.OutputStream result) throws java.io.IOExceptionWrites the content of one RTF information element.- Specified by:
writeContentin interfaceRtfBasicElement- Specified by:
writeContentin classRtfElement- Parameters:
result- TheOutputStreamto write the content to- Throws:
java.io.IOException
-
convertDate
private java.lang.String convertDate(java.lang.String date)
Converts a date from the format used by iText to the format required by rtf.
iText: EEE MMM dd HH:mm:ss zzz yyyy - rtf: \\'yr'yyyy\\'mo'MM\\'dy'dd\\'hr'HH\\'min'mm\\'sec'ss- Parameters:
date- The date formated by iText- Returns:
- The date formated for rtf
-
-