public class ASString extends ASObject implements Comparable
| Constructor and Description |
|---|
ASString(byte[] bytes) |
ASString(int[] numbers,
int bytesToUse,
int bytesToPad)
Construct an
ASString from an array of integers. |
ASString(int[] numbers,
int startIndex,
int endIndex,
int bytesToUse,
int bytesToPad) |
ASString(String javaString)
Creates an ASString that contains UTF-8.
|
ASString(String javaString,
CharsetEncoder cse)
Creates an ASString that contains the bytes received
by encoding the javaString with the provided cse.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asString()
Try to get a chars associated with a byte in this ASString.
|
int |
compareTo(Object anotherString) |
ASString |
concat(ASString addStr) |
boolean |
equals(ASString anotherString) |
boolean |
equals(Object anotherString) |
byte[] |
getBytes()
Get the raw bytes associated with this ASString.
|
char |
getChar(int index)
Try to get a chars associated with a byte in this ASString.
|
char[] |
getChars()
Try to get an array of chars associated with this ASString.
|
int |
hashCode() |
int |
indexOf(byte[] key) |
int |
lastIndexOf(int target) |
ASString |
substring(int begin) |
ASString |
substring(int begin,
int end) |
String |
toString()
Attempts to get a unicode representation for this unencoded string.
|
void |
write(OutputByteStream outputByteStream)
Writes the ASString in to the given OutputStream in the format expected by the PDF Spec.
|
public ASString(byte[] bytes)
public ASString(String javaString)
public ASString(String javaString, CharsetEncoder cse) throws PDFInvalidParameterException
PDFInvalidParameterExceptionpublic ASString(int[] numbers,
int bytesToUse,
int bytesToPad)
throws PDFInvalidParameterException
ASString from an array of integers.numbers - numbers to use in constructing the ASStringbytesToUse - number of bytes to use from each number starting with the LSB. Must be from 1 to 4.bytesToPad - number of bytes to pad in front of each number beyond the number of bytes taken from each numberPDFInvalidParameterException - if the bytesToUse is not between 1 and 4public ASString(int[] numbers,
int startIndex,
int endIndex,
int bytesToUse,
int bytesToPad)
throws PDFInvalidParameterException
PDFInvalidParameterExceptionpublic byte[] getBytes()
public char[] getChars()
public char getChar(int index)
public String asString()
public String toString()
public int compareTo(Object anotherString)
compareTo in interface Comparablepublic boolean equals(ASString anotherString)
public int indexOf(byte[] key)
public int lastIndexOf(int target)
public ASString substring(int begin)
public ASString substring(int begin, int end)
public void write(OutputByteStream outputByteStream) throws PDFIOException
write in class ASObjectoutputByteStream - OutputByteStream to write to.PDFIOExceptionASHexStringCopyright © 2010 - 2020 Adobe. All Rights Reserved