|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.util.Utils
public class Utils
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
convertByteArrayToByteString(byte[] bytes)
When converting between String chars and bytes, there's an implied encoding to be used, dependent on the context and platform. |
static java.lang.String |
convertByteArrayToHexString(byte[] buffer,
boolean addSpaceSeparator)
|
static java.lang.String |
convertByteArrayToHexString(byte[] buffer,
boolean addSpaceSeparator,
int addDelimiterEverNBytes,
char delimiter)
|
static java.lang.String |
convertByteArrayToHexString(byte[] buffer,
int offset,
int length,
boolean addSpaceSeparator,
int addDelimiterEverNBytes,
char delimiter)
|
static byte[] |
convertByteCharSequenceToByteArray(java.lang.CharSequence string)
When converting between String chars and bytes, there's an implied encoding to be used, dependent on the context and platform. |
static java.lang.String |
getContentAndReplaceInputStream(java.io.InputStream[] inArray,
boolean convertToHex)
|
static java.lang.String |
getContentFromSeekableInput(SeekableInput in,
boolean convertToHex)
|
static int |
numBytesToHoldBits(int numBits)
|
static void |
printMemory(java.lang.String str)
|
static int |
readIntWithVaryingBytesBE(java.io.InputStream in,
int numBytes)
|
static long |
readLongWithVaryingBytesBE(java.io.InputStream in,
int numBytes)
|
static boolean |
reflectGraphicsEnvironmentISHeadlessInstance(java.lang.Object graphicsEnvironment,
boolean defaultReturnIfNoMethod)
boolean java.awt.GraphicsEnvironment.isHeadless() does not exist in Java 1.3, since it was introduced in Java 1.4, so we use reflection to call it, if it exists. |
static SeekableInput |
replaceInputStreamWithSeekableInput(java.io.InputStream in)
|
static void |
setIntIntoByteArrayBE(int value,
byte[] buffer,
int offset)
Sets the value into the buffer, at the designated offset, using big-endian rules Callers is responsible to ensure that value will fit into buffer, starting at offset |
static void |
setShortIntoByteArrayBE(short value,
byte[] buffer,
int offset)
Sets the value into the buffer, at the designated offset, using big-endian rules Callers is responsible to ensure that value will fit into buffer, starting at offset |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static void setIntIntoByteArrayBE(int value,
byte[] buffer,
int offset)
value - to be set into bufferbuffer - into which value is to be setoffset - into buffer which value is to be set
public static void setShortIntoByteArrayBE(short value,
byte[] buffer,
int offset)
value - to be set into bufferbuffer - into which value is to be setoffset - into buffer which value is to be set
public static long readLongWithVaryingBytesBE(java.io.InputStream in,
int numBytes)
throws java.io.IOException
in - InputStream to read fromnumBytes - number of bytes to read to make integral value from [0, 8]
java.io.IOException
public static int readIntWithVaryingBytesBE(java.io.InputStream in,
int numBytes)
throws java.io.IOException
in - InputStream to read fromnumBytes - number of bytes to read to make integral value from [0, 4]
java.io.IOException
public static java.lang.String convertByteArrayToHexString(byte[] buffer,
boolean addSpaceSeparator)
public static java.lang.String convertByteArrayToHexString(byte[] buffer,
boolean addSpaceSeparator,
int addDelimiterEverNBytes,
char delimiter)
public static java.lang.String convertByteArrayToHexString(byte[] buffer,
int offset,
int length,
boolean addSpaceSeparator,
int addDelimiterEverNBytes,
char delimiter)
public static boolean reflectGraphicsEnvironmentISHeadlessInstance(java.lang.Object graphicsEnvironment,
boolean defaultReturnIfNoMethod)
graphicsEnvironment - java.awt.GraphicsEnvironment to call isHeadless() ondefaultReturnIfNoMethod - Value to return if could not call graphicsEnvironment.isHeadless()
public static java.lang.String getContentAndReplaceInputStream(java.io.InputStream[] inArray,
boolean convertToHex)
public static java.lang.String getContentFromSeekableInput(SeekableInput in,
boolean convertToHex)
public static SeekableInput replaceInputStreamWithSeekableInput(java.io.InputStream in)
public static void printMemory(java.lang.String str)
public static int numBytesToHoldBits(int numBits)
public static byte[] convertByteCharSequenceToByteArray(java.lang.CharSequence string)
LiteralStringObject,
HexStringObject,
StandardEncryptionpublic static java.lang.String convertByteArrayToByteString(byte[] bytes)
LiteralStringObject,
HexStringObject,
StandardEncryption
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||