|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.util.StringUtil
Title: String Utility Description: Collection of string handling utilities Now it is quite confusing: the method pairs, in which one of them write data and other read written data are: putUncompressedUnicodeHigh and getFromUnicode putUncompressedUnicode and getFromUnicodeHigh
Method Summary | |
static java.lang.String |
format(java.lang.String message,
java.lang.Object[] params)
Description of the Method |
static java.lang.String |
getFromCompressedUnicode(byte[] string,
int offset,
int len)
read compressed unicode(8bit) |
static java.lang.String |
getFromUnicode(byte[] string)
given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x00, 0x16 } -> 0x16 |
static java.lang.String |
getFromUnicode(byte[] string,
int offset,
int len)
given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x00, 0x16 } -> 0x16 |
static java.lang.String |
getFromUnicodeHigh(byte[] string)
given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -> 0x16 |
static java.lang.String |
getFromUnicodeHigh(byte[] string,
int offset,
int len)
given a byte array of 16-bit unicode characters, compress to 8-bit and return a string { 0x16, 0x00 } -> 0x16 |
static java.lang.String |
getPreferredEncoding()
|
static void |
putCompressedUnicode(java.lang.String input,
byte[] output,
int offset)
write compressed unicode |
static void |
putUncompressedUnicode(java.lang.String input,
byte[] output,
int offset)
Write uncompressed unicode |
static void |
putUncompressedUnicodeHigh(java.lang.String input,
byte[] output,
int offset)
Write uncompressed unicode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String getFromUnicodeHigh(byte[] string, int offset, int len) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException
string
- the byte array to be convertedoffset
- the initial offset into the
byte array. it is assumed that string[ offset ] and string[ offset +
1 ] contain the first 16-bit unicode characterlen
-
java.lang.ArrayIndexOutOfBoundsException
- if offset is out of bounds for
the byte array (i.e., is negative or is greater than or equal to
string.length)
java.lang.IllegalArgumentException
- if len is too large (i.e.,
there is not enough data in string to create a String of that
length)public static java.lang.String getFromUnicodeHigh(byte[] string)
string
- the byte array to be converted
public static java.lang.String getFromUnicode(byte[] string, int offset, int len) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.IllegalArgumentException
string
- the byte array to be convertedoffset
- the initial offset into the
byte array. it is assumed that string[ offset ] and string[ offset +
1 ] contain the first 16-bit unicode characterlen
-
java.lang.ArrayIndexOutOfBoundsException
- if offset is out of bounds for
the byte array (i.e., is negative or is greater than or equal to
string.length)
java.lang.IllegalArgumentException
- if len is too large (i.e.,
there is not enough data in string to create a String of that
length)public static java.lang.String getFromUnicode(byte[] string)
string
- the byte array to be converted
public static java.lang.String getFromCompressedUnicode(byte[] string, int offset, int len)
string
- byte array to readoffset
- offset to read byte arraylen
- length to read byte array
public static void putCompressedUnicode(java.lang.String input, byte[] output, int offset)
input
- the String containing the data to be writtenoutput
- the byte array to which the data is to be writtenoffset
- an offset into the byte arrat at which the data is start
when writtenpublic static void putUncompressedUnicode(java.lang.String input, byte[] output, int offset)
input
- the String containing the unicode data to be writtenoutput
- the byte array to hold the uncompressed unicodeoffset
- the offset to start writing into the byte arraypublic static void putUncompressedUnicodeHigh(java.lang.String input, byte[] output, int offset)
input
- the String containing the unicode data to be writtenoutput
- the byte array to hold the uncompressed unicodeoffset
- the offset to start writing into the byte arraypublic static java.lang.String format(java.lang.String message, java.lang.Object[] params)
message
- Description of the Parameterparams
- Description of the Parameter
public static java.lang.String getPreferredEncoding()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |