|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.intarsys.pdf.cos.COSDocumentElement
de.intarsys.pdf.cos.COSObject
de.intarsys.pdf.cos.COSPrimitiveObject
de.intarsys.pdf.cos.COSString
public class COSString
The string representation for a pdf document
Field Summary |
---|
Fields inherited from class de.intarsys.pdf.cos.COSObject |
---|
CONSTANT_CONTAINER, NULL_CONTAINER, SLOT_CONTAINER |
Method Summary | |
---|---|
Object |
accept(ICOSObjectVisitor visitor)
Accept a visitor object. |
COSString |
asString()
|
byte[] |
byteValue()
The bytes that make up this string. |
int |
compareTo(Object o)
|
static COSString |
create(byte[] bytes)
Create a COSString from bytes . |
static COSString |
create(String string)
Create a COSString from string . |
static COSString |
createHex(byte[] bytes)
Create a COSString from bytes in hex
representation. |
static COSString |
createHex(String string)
Create a COSString from string in hex
representation. |
static COSString |
createMultiLine(String string)
Create a COSString from string , escaoing all
newlines. |
boolean |
equals(Object o)
|
int |
hashCode()
|
String |
hexStringValue()
Show a hex encoded representation of the strings content. |
boolean |
isHexMode()
true if this string has to be saved as hex representation |
String |
multiLineStringValue()
A Java String with correctly expanded newlines. |
void |
restoreState(Object object)
|
Object |
saveState()
|
void |
setHexMode(boolean newHexMode)
Set the flag if this is written in hex representation |
String |
stringValue()
The Java String representation of the receiver |
Methods inherited from class de.intarsys.pdf.cos.COSPrimitiveObject |
---|
addObjectListener, basicIterator, copyDeep, copyDeep, isDangling, isObjectListenerAvailable, isPrimitive, iterator, removeObjectListener |
Methods inherited from class de.intarsys.pdf.cos.COSObject |
---|
asArray, asBoolean, asDictionary, asFixed, asInteger, asName, asNull, asNumber, asStream, beConstant, beIndirect, containable, copyOptional, copyShallow, copySubGraph, dereference, getContainer, getDoc, getIndirectObject, isIndirect, isNull, isNumber, isSwapped, toString |
Methods inherited from class de.intarsys.pdf.cos.COSDocumentElement |
---|
handleException, isReference |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static COSString create(byte[] bytes)
COSString
from bytes
.
bytes
-
COSString
public static COSString create(String string)
COSString
from string
.
string
-
COSString
public static COSString createHex(byte[] bytes)
COSString
from bytes
in hex
representation.
bytes
-
COSString
public static COSString createHex(String string)
COSString
from string
in hex
representation.
string
-
COSString
public static COSString createMultiLine(String string)
COSString
from string
, escaoing all
newlines.
string
-
COSString
public Object accept(ICOSObjectVisitor visitor) throws COSVisitorException
COSDocumentElement
visitor
by "double dispatching".
accept
in class COSDocumentElement
visitor
- The object visiting the receiver.
COSVisitorException
- An exception depending on the visitor semantics.public COSString asString()
asString
in class COSObject
null
public String hexStringValue()
public byte[] byteValue()
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean isHexMode()
true
if this string has to be saved as hex representation
true
if this string has to be saved as hex
representationpublic String multiLineStringValue()
String
with correctly expanded newlines.
String
with correctly expanded newlines.public void restoreState(Object object)
restoreState
in interface de.intarsys.tools.component.ISaveStateSupport
restoreState
in class COSObject
public Object saveState()
saveState
in interface de.intarsys.tools.component.ISaveStateSupport
public void setHexMode(boolean newHexMode)
newHexMode
- true
if this is written in hex representationpublic String stringValue()
String
representation of the receiver
stringValue
in class COSObject
String
representation of the receiver
|
intarsys PDF library API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |