Class StringUtils
java.lang.Object
com.itextpdf.text.pdf.StringUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]convertCharsToBytes(char[] chars) Converts an array of unsigned 16bit numbers to an array of bytes.static byte[]escapeString(byte[] bytes) Escapes abytearray according to the PDF conventions.static voidescapeString(byte[] bytes, ByteBuffer content) Escapes abytearray according to the PDF conventions.
-
Field Details
-
r
private static final byte[] r -
n
private static final byte[] n -
t
private static final byte[] t -
b
private static final byte[] b -
f
private static final byte[] f
-
-
Constructor Details
-
StringUtils
private StringUtils()
-
-
Method Details
-
escapeString
public static byte[] escapeString(byte[] bytes) Escapes abytearray according to the PDF conventions.- Parameters:
bytes- thebytearray to escape- Returns:
- an escaped
bytearray
-
escapeString
Escapes abytearray according to the PDF conventions.- Parameters:
bytes- thebytearray to escapecontent- the content
-
convertCharsToBytes
public static byte[] convertCharsToBytes(char[] chars) Converts an array of unsigned 16bit numbers to an array of bytes. The input values are presented as chars for convenience.- Parameters:
chars- the array of 16bit numbers that should be converted- Returns:
- the resulting byte array, twice as large as the input
-