public class CosString extends CosScalar
DIRECT, INDIRECT, t_Array, t_Boolean, t_Dictionary, t_KeyAbsent, t_Name, t_Null, t_Numeric, t_ObjectRef, t_Stream, t_String| Modifier and Type | Method and Description |
|---|---|
ASDate |
asDate()
Returns this string as
ASDate if it's in proper date format else throws exception. |
String |
asString()
Returns String value.
|
byte[] |
byteArrayValue()
Obtains the string data.
|
boolean |
equals(ASString string) |
boolean |
equals(byte[] b) |
boolean |
equals(CosObject value)
This method returns true if both CosStrings have same byte array inside.
|
boolean |
equals(CosString string) |
boolean |
getIsEncrypted()
Tells whether this string is already encrypted or not.
|
boolean |
getToEncrypt()
Returns true if string is to be encrypted.
|
int |
getType()
return the type of this CosObject
|
Object |
getValue() |
boolean |
getWriteHex()
Returns true if this string is written in hex format.
|
ASHexString |
hexStringValue()
Returns hex string value if it's type of
CosString else throws exception. |
boolean |
isOddBall()
Returns true if this is hex string and ended on odd nibble.
|
void |
setDataInternal(byte[] newData,
boolean markDirty)
Only for internal engineering use.
|
void |
setIsEncrypted(boolean encrypted)
Sets the flag which tells whether this string is already encrypted or not.
|
void |
setToEncrypt(boolean encrypted)
Sets true if string is to be encrypted.
|
void |
setWriteHex(boolean b)
If true is passed here then this string is written in hex format.
|
ASString |
stringValue()
Returns string value if it's type of
CosString else throws exception. |
String |
textValue()
Creates an instance of a String object "wrapping" the specified
CosString.
|
String |
toString() |
booleanValue, doubleValue, equals, getDocument, getObjEOF, getObjGen, getObjNum, getObjPos, getObjRevision, getStreamManager, intValue, isCompressed, isDirty, isIndirect, longValue, nameValue, numberValuepublic int getType()
public byte[] byteArrayValue()
throws PDFSecurityException
PDFSecurityExceptionpublic ASString stringValue() throws PDFSecurityException
CosObjectCosString else throws exception.stringValue in class CosObjectPDFSecurityExceptionpublic ASHexString hexStringValue() throws PDFSecurityException
CosObjectCosString else throws exception.hexStringValue in class CosObjectPDFSecurityExceptionpublic String asString() throws PDFSecurityException
PDFSecurityExceptionpublic Object getValue() throws PDFSecurityException
getValue in class CosObjectPDFSecurityExceptionpublic String textValue() throws PDFSecurityException
textValue in class CosObjectPDFSecurityExceptionRuntimeException, - hard failure, if basic encodings aren't supported
This represents a "can't happen" situationpublic void setDataInternal(byte[] newData,
boolean markDirty)
throws PDFCosParseException,
PDFIOException,
PDFSecurityException
public ASDate asDate() throws PDFCosParseException, PDFSecurityException
ASDate if it's in proper date format else throws exception.public void setWriteHex(boolean b)
public boolean getWriteHex()
public boolean isOddBall()
public void setToEncrypt(boolean encrypted)
public boolean getToEncrypt()
public void setIsEncrypted(boolean encrypted)
public boolean getIsEncrypted()
public boolean equals(ASString string)
public boolean equals(CosString string)
public boolean equals(CosObject value)
public boolean equals(byte[] b)
Copyright © 2010 - 2020 Adobe. All Rights Reserved