|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.lowagie.text.pdf.PdfObject
com.lowagie.text.pdf.PdfString
A PdfString-class is the PDF-equivalent of a JAVA-String-object.
A string is a sequence of characters delimited by parenthesis. If a string is too long
to be conveniently placed on a single line, it may be split across multiple lines by using
the backslash character (\) at the end of a line to indicate that the string continues
on the following line. Within a string, the backslash character is used as an escape to
specify unbalanced parenthesis, non-printing ASCII characters, and the backslash character
itself. Use of the \ddd escape sequence is the preferred way to represent characters
outside the printable ASCII character set.
This object is described in the 'Portable Document Format Reference Manual version 1.3'
section 4.4 (page 37-39).
PdfObject,
BadPdfFormatException| Field Summary | |
protected String |
encoding
The encoding. |
protected boolean |
hexWriting
|
protected int |
objGen
|
protected int |
objNum
|
protected String |
value
The value of this object. |
| Fields inherited from class com.lowagie.text.pdf.PdfObject |
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type |
| Constructor Summary | |
PdfString()
Constructs an empty PdfString-object. |
|
PdfString(byte[] bytes)
Constructs a PdfString-object. |
|
PdfString(String value)
Constructs a PdfString-object. |
|
PdfString(String value,
String encoding)
Constructs a PdfString-object. |
|
| Method Summary | |
(package private) void |
decrypt(PdfReader reader)
|
byte[] |
getBytes()
|
String |
getEncoding()
Gets the encoding of this string. |
(package private) void |
setObjNum(int objNum,
int objGen)
|
PdfString |
setWritingMode(boolean hexWriting)
|
void |
toPdf(PdfWriter writer,
OutputStream os)
Returns the PDF representation of this PdfString. |
String |
toString()
Returns the String value of the PdfString-object. |
String |
toUnicodeString()
|
| Methods inherited from class com.lowagie.text.pdf.PdfObject |
isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, type |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String value
protected String encoding
protected int objNum
protected int objGen
protected boolean hexWriting
| Constructor Detail |
public PdfString()
PdfString-object.
public PdfString(String value)
PdfString-object.
value - the content of the string
public PdfString(String value,
String encoding)
PdfString-object.
value - the content of the stringencoding - an encodingpublic PdfString(byte[] bytes)
PdfString-object.
bytes - an array of byte| Method Detail |
public void toPdf(PdfWriter writer,
OutputStream os)
throws IOException
PdfString.
toPdf in class PdfObjectbytes
IOExceptionpublic String toString()
String value of the PdfString-object.
toString in class PdfObjectStringpublic String getEncoding()
Stringpublic String toUnicodeString()
void setObjNum(int objNum,
int objGen)
void decrypt(PdfReader reader)
public byte[] getBytes()
getBytes in class PdfObjectpublic PdfString setWritingMode(boolean hexWriting)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||