com.icesoft.pdf.pobjects
Interface StringObject

All Known Implementing Classes:
HexStringObject, LiteralStringObject

public interface StringObject

This class represents a PDF String Object. A StringObject consists of a series of bytes in the range 0 to 255. A StringObject can be written in two ways:

The methods define in this interface are common to both Literal and Hexadecimal Strings Object.

Since:
2.0

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.
 StringBuffer getHexStringBuffer()
          Gets a hexadecimal StringBuffer representation of this objects data.
 int getLength()
          The length of the underlying objects data.
 String getLiteralString()
          Gets a literal String representation of this object's data.
 StringBuffer getLiteralStringBuffer()
          Gets a literal StringBuffer representation of this object's data.
 StringBuffer getLiteralStringBuffer(int fontFormat, NFont font)
          Gets a literal String representation of this objects data using the specified font and format.
 int getUnsignedInt(int start, int offset)
          Gets the unsigned integer value of this object's data specified by the start index and offset parameters.
 void setReference(Reference reference)
          Sets the parent PDF object's reference.
 String toString()
          Returns a string representation of the object.
 

Method Detail

toString

public String toString()

Returns a string representation of the object.

Returns:
a string representing the object.

getLiteralStringBuffer

public StringBuffer getLiteralStringBuffer()

Gets a literal StringBuffer representation of this object's data.

Returns:
a StringBuffer representing the objects data.

getLiteralString

public String getLiteralString()

Gets a literal String representation of this object's data.

Returns:
a String representation of the object's data.

getHexStringBuffer

public StringBuffer getHexStringBuffer()

Gets a hexadecimal StringBuffer representation of this objects data.

Returns:
a StringBufffer representation of the objects data.

getHexString

public String getHexString()

Gets a hexadecimal String representation of this object's data.

Returns:
a String representation of the object's data.

getUnsignedInt

public int getUnsignedInt(int start,
                          int offset)
Gets the unsigned integer value of this object's data specified by the start index and offset parameters.

Parameters:
start - the beginning index, inclusive.
offset - the number of string characters to read.
Returns:
integer value of the specified range of characters.

getLiteralStringBuffer

public StringBuffer getLiteralStringBuffer(int fontFormat,
                                           NFont font)
Gets a literal String representation of this objects data using the specified font and format.

Parameters:
fontFormat - 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 respectively
font - font used to render the literal string data.
Returns:
StringBuffer which contains all renderaable characters for the given font.

getLength

public int getLength()
The length of the underlying objects data.

Returns:
length of objct's data.

setReference

public void setReference(Reference reference)
Sets the parent PDF object's reference.

Parameters:
reference - parent object reference.

getDecryptedLiteralString

public String getDecryptedLiteralString(SecurityManager securityManager)
Gets the decrypted literal string value of the data using the key provided by the security manager.

Parameters:
securityManager - security manager associated with parent document.