|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.pobjects.LiteralStringObject
This class represents a PDF Literal String Object. Literal String objects are written as a sequence of literal characters enclosed in parentheses ().
| Constructor Summary | |
LiteralStringObject(byte[] bytes)
Creates a new literal string object so that it represents the same sequence of bytes as in the bytes argument. |
|
LiteralStringObject(String string)
Creates a new literal string object so that it represents the same sequence of character data specifed by the argument. |
|
LiteralStringObject(StringBuffer stringBuffer)
Creates a new literal string object so that it represents the same sequence of character data specifed by the argument. |
|
| Method Summary | |
String |
getDecryptedLiteralString(SecurityManager securityManager)
Gets the decrypted literal string value of the data using the key provided by the security manager. |
String |
getHexString()
Gets a hexadecimal String representation of this object's data, which is converted to hexadecimal form. |
StringBuffer |
getHexStringBuffer()
Gets a hexadecimal StringBuffer representation of this object's data, which is converted to hexadecimal form. |
int |
getLength()
The length of the the underlying object's data. |
String |
getLiteralString()
Gets a literal String representation of this object's data, which is in fact, the raw data contained in this object. |
StringBuffer |
getLiteralStringBuffer()
Gets a literal StringBuffer representation of this object's data which is in fact, the raw data contained in this object. |
StringBuffer |
getLiteralStringBuffer(int fontFormat,
NFont font)
Gets a literal String representation of this object's data using the specifed font and format. |
int |
getUnsignedInt(int start,
int offset)
Gets the integer value of the hexidecimal data specified by the start and offset parameters. |
void |
setReference(Reference reference)
Sets the parent PDF object's reference. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public LiteralStringObject(byte[] bytes)
Creates a new literal string object so that it represents the same sequence of bytes as in the bytes argument. In other words, the initial content of the literal string is the characters represented by the byte data.
bytes - array of bytes which will be interpreted as literal
character data.public LiteralStringObject(String string)
Creates a new literal string object so that it represents the same sequence of character data specifed by the argument.
string - the initial contents of the literal string objectpublic LiteralStringObject(StringBuffer stringBuffer)
Creates a new literal string object so that it represents the same sequence of character data specifed by the argument. The first and last characters of the StringBuffer are removed. This constructor should only be used in the context of the parser which has leading and ending parentheses which are removed by this method.
stringBuffer - the initial contents of the literal string object| Method Detail |
public int getUnsignedInt(int start,
int offset)
getUnsignedInt in interface StringObjectstart - the begining index, inclusiveoffset - the length of bytes to process
public String toString()
Returns a string representation of the object.
toString in interface StringObjectpublic String getHexString()
Gets a hexadecimal String representation of this object's data, which is converted to hexadecimal form.
getHexString in interface StringObjectpublic StringBuffer getHexStringBuffer()
Gets a hexadecimal StringBuffer representation of this object's data, which is converted to hexadecimal form.
getHexStringBuffer in interface StringObjectpublic StringBuffer getLiteralStringBuffer()
Gets a literal StringBuffer representation of this object's data which is in fact, the raw data contained in this object.
getLiteralStringBuffer in interface StringObjectpublic String getLiteralString()
Gets a literal String representation of this object's data, which is in fact, the raw data contained in this object.
getLiteralString in interface StringObject
public StringBuffer getLiteralStringBuffer(int fontFormat,
NFont font)
Gets a literal String representation of this object's data using the specifed font and format. The font is used to verify that the specific character codes can be rendered; if they cannot they may be removed or combined with the next character code to get a displayable character code.
getLiteralStringBuffer in interface StringObjectfontFormat - the type of pdf font which will be used to display
the text. Valid values are CID_FORMAT and SIMPLE_FORMAT for Adobe
Composite and Simple font types respectivelyfont - font used to render the the literal string data.
public int getLength()
getLength in interface StringObjectpublic void setReference(Reference reference)
setReference in interface StringObjectreference - parent object reference.public String getDecryptedLiteralString(SecurityManager securityManager)
getDecryptedLiteralString in interface StringObjectsecurityManager - security manager associated with parent document.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||