| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static int | |
| private static final int[] | |
| private static final int[] | |
| public static final Charset | |
| public static final Charset | |
| public static final Charset |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: the number of occurrences, 0 if the CharSequence is nullthe CharSequence to check, may be null haystack, char the character to count the quantity of needle)Count number of occurrences of needle in haystack Has same signature as org.apache.commons.lang3.StringUtils#countMatches |
| public static boolean | endsWithIgnoreCase(String haystack, String suffix)
Tests if the string ends with the specified suffix, ignoring case consideration. |
| public static int | Returns: the number of bytes that would be written bywriteUnicodeString(LittleEndianOutput, String)
|
| public static String | Returns: String generated String instance by reading byte array (ISO-8859-1)byte array to read string, final int offset to read byte array offset, final int length to read byte array len)Read 8 bit data (in ISO-8859-1 codepage) into a (unicode) Java String and return. |
| public static String | Returns: String generated String instance by reading byte array (UTF-8)byte array to read string, final int offset to read byte array offset, final int length to read byte array len)Read 8 bit data (in UTF-8 codepage) into a (unicode) Java String and return. |
| public static String | Returns: the converted string, nevernull.the byte array to be converted string, final int the initial offset into the
byte array. it is assumed that string[ offset ] and string[ offset +
1 ] contain the first 16-bit unicode character offset, final int the length of the final string len)Given a byte array of 16-bit unicode characters in Little Endian format (most important byte last), return a Java String representation of it. |
| public static String | Returns: the converted string, nevernullthe byte array to be converted string)Given a byte array of 16-bit unicode characters in little endian format (most important byte last), return a Java String representation of it. |
| public static String | Returns: the converted string, nevernull.the byte array to be converted string, final int the initial offset into the
byte array. it is assumed that string[ offset ] and string[ offset +
1 ] contain the first 16-bit unicode character offset, final int the max. length of the final string len)Given a byte array of 16-bit unicode characters in Little Endian format (most important byte last), return a Java String representation of it. |
| public static int | |
| public static String | |
| public static byte[] | Returns: the byte array of 16-bit unicode charactersthe string string)Convert String to 16-bit unicode characters in little endian format |
| public static boolean | Returns: boolean result true:string has at least one multibyte characterstring to check value)check the parameter has multibyte character |
| public static boolean | Returns: true if the CharSequence is null, empty or whitespace onlythe CharSequence to check, may be null cs)Checks if a CharSequence is empty (""), null or whitespace only. |
| public static boolean | Returns: true if the CharSequence is
not empty and not null and not whitespace onlythe CharSequence to check, may be null cs)Checks if a CharSequence is not empty (""), not null and not whitespace only. |
| public static boolean | |
| public static String | |
| public static String | |
| public static String | |
| public static int | Returns: CharSequence length or0 if the CharSequence is
null.a CharSequence or cs)nullGets a CharSequence length or |
| private static int | |
| public static String | Returns: the string with mapped charactersthe original string string)Some strings may contain encoded characters of the unicode private use area. |
| public static void | putCompressedUnicode(String
the String containing the data to be written input, byte[] the byte array to which the data is to be written output, int an offset into the byte arrat at which the data is start
when written offset)Takes a unicode (java) string, and returns it as 8 bit data (in ISO-8859-1 codepage). |
| public static void | |
| public static void | putUnicodeLE(String
the String containing the unicode data to be written input, byte[] the byte array to hold the uncompressed unicode, should be twice the length of the String output, int the offset to start writing into the byte array offset)Takes a unicode string, and returns it as little endian (most important byte last) bytes in the supplied byte array. |
| public static void | |
| public static String | Returns: ISO_8859_1 encoded resultstream, in, int number pf chars nChars)
|
| public static String | |
| public static String | readUnicodeString(LittleEndianInput in)
InputStream
|
| public static String | readUnicodeString(LittleEndianInput in, int nChars)
InputStream
|
| public static String | Returns: String with repeated charactercharacter to repeat ch, final int number of times to repeat char, negative treated as zero repeat)Returns padding using the specified delimiter repeated to a given length. |
| public static void | |
| public static boolean | startsWithIgnoreCase(String haystack, String prefix)
Tests if the string starts with the specified prefix, ignoring case consideration. |
| public static String | |
| public static String | |
| public static void | writeUnicodeString(LittleEndianOutput out, String value)
OutputStream
|
| public static void | writeUnicodeStringFlagAndData(LittleEndianOutput out, String value)
OutputStream
|
| DEFAULT_MAX_RECORD_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_MAX_RECORD_LENGTH | |
| MAX_RECORD_LENGTH | back to summary |
|---|---|
| private static int MAX_RECORD_LENGTH | |
| symbolMap_f020 | back to summary |
|---|---|
| private static final int[] symbolMap_f020 | |
| symbolMap_f0a0 | back to summary |
|---|---|
| private static final int[] symbolMap_f0a0 | |
| UTF16LE | back to summary |
|---|---|
| public static final Charset UTF16LE | |
| UTF8 | back to summary |
|---|---|
| public static final Charset UTF8 | |
| WIN_1252 | back to summary |
|---|---|
| public static final Charset WIN_1252 | |
| StringUtil | back to summary |
|---|---|
| private StringUtil() | |
| countMatches | back to summary |
|---|---|
| public static int countMatches(CharSequence haystack, char needle) Count number of occurrences of needle in haystack Has same signature as org.apache.commons.lang3.StringUtils#countMatches
| |
| endsWithIgnoreCase | back to summary |
|---|---|
| public static boolean endsWithIgnoreCase(String haystack, String suffix) Tests if the string ends with the specified suffix, ignoring case consideration. | |
| getEncodedSize | back to summary |
|---|---|
public static int getEncodedSize(String value)
| |
| getFromCompressedUnicode | back to summary |
|---|---|
| public static String getFromCompressedUnicode(final byte[] string, final int offset, final int len) Read 8 bit data (in ISO-8859-1 codepage) into a (unicode) Java String and return. (In Excel terms, read compressed 8 bit unicode as a string)
| |
| getFromCompressedUTF8 | back to summary |
|---|---|
| public static String getFromCompressedUTF8(final byte[] string, final int offset, final int len) Read 8 bit data (in UTF-8 codepage) into a (unicode) Java String and return. (In Excel terms, read compressed 8 bit unicode as a string)
| |
| getFromUnicodeLE | back to summary |
|---|---|
| public static String getFromUnicodeLE(final byte[] string, final int offset, final int len) throws ArrayIndexOutOfBoundsException, IllegalArgumentException Given a byte array of 16-bit unicode characters in Little Endian format (most important byte last), return a Java String representation of it. { 0x16, 0x00 } -0x16
| |
| getFromUnicodeLE | back to summary |
|---|---|
| public static String getFromUnicodeLE(byte[] string) Given a byte array of 16-bit unicode characters in little endian format (most important byte last), return a Java String representation of it. { 0x16, 0x00 } -0x16
| |
| getFromUnicodeLE0Terminated | back to summary |
|---|---|
| public static String getFromUnicodeLE0Terminated(final byte[] string, final int offset, final int len) throws ArrayIndexOutOfBoundsException, IllegalArgumentException Given a byte array of 16-bit unicode characters in Little Endian format (most important byte last), return a Java String representation of it. Scans the byte array for two continous 0 bytes and returns the string before. #61881: there seem to be programs out there, which write the 0-termination also at the beginning of the string. Check if the next two bytes contain a valid ascii char and correct the _recdata with a '?' char
| |
| getMaxRecordLength | back to summary |
|---|---|
public static int getMaxRecordLength()
| |
| getPreferredEncoding | back to summary |
|---|---|
public static String getPreferredEncoding()
| |
| getToUnicodeLE | back to summary |
|---|---|
| public static byte[] getToUnicodeLE(String string) Convert String to 16-bit unicode characters in little endian format
| |
| hasMultibyte | back to summary |
|---|---|
| public static boolean hasMultibyte(String value) check the parameter has multibyte character
| |
| isBlank | back to summary |
|---|---|
| public static boolean isBlank(final CharSequence cs) Checks if a CharSequence is empty (""), null or whitespace only. Whitespace is defined by
StringUtil.isBlank(null) = true
StringUtil.isBlank("") = true
StringUtil.isBlank(" ") = true
StringUtil.isBlank("bob") = false
StringUtil.isBlank(" bob ") = false
copied from commons-lang3
| |
| isNotBlank | back to summary |
|---|---|
| public static boolean isNotBlank(final CharSequence cs) Checks if a CharSequence is not empty (""), not null and not whitespace only. Whitespace is defined by
StringUtil.isNotBlank(null) = false
StringUtil.isNotBlank("") = false
StringUtil.isNotBlank(" ") = false
StringUtil.isNotBlank("bob") = true
StringUtil.isNotBlank(" bob ") = true
copied from commons-lang3
| |
| isUpperCase | back to summary |
|---|---|
public static boolean isUpperCase(char c)
| |
| join | back to summary |
|---|---|
public static String join(Object[] array, String separator)
| |
| join | back to summary |
|---|---|
public static String join(Object[] array)
| |
| join | back to summary |
|---|---|
public static String join(String separator, Object... array)
| |
| length | back to summary |
|---|---|
| public static int length(final CharSequence cs) Gets a CharSequence length or
| |
| mapMsCodepoint | back to summary |
|---|---|
| private static int mapMsCodepoint(int cp) | |
| mapMsCodepointString | back to summary |
|---|---|
| public static String mapMsCodepointString(String string) Some strings may contain encoded characters of the unicode private use area. Currently the characters of the symbol fonts are mapped to the corresponding characters in the normal unicode range.
| |
| putCompressedUnicode | back to summary |
|---|---|
| public static void putCompressedUnicode(String input, byte[] output, int offset) Takes a unicode (java) string, and returns it as 8 bit data (in ISO-8859-1 codepage). (In Excel terms, write compressed 8 bit unicode)
| |
| putCompressedUnicode | back to summary |
|---|---|
| public static void putCompressedUnicode(String input, LittleEndianOutput out) | |
| putUnicodeLE | back to summary |
|---|---|
| public static void putUnicodeLE(String input, byte[] output, int offset) Takes a unicode string, and returns it as little endian (most important byte last) bytes in the supplied byte array. (In Excel terms, write uncompressed unicode)
| |
| putUnicodeLE | back to summary |
|---|---|
| public static void putUnicodeLE(String input, LittleEndianOutput out) | |
| readCompressedUnicode | back to summary |
|---|---|
public static String readCompressedUnicode(LittleEndianInput in, int nChars)
| |
| readUnicodeLE | back to summary |
|---|---|
| public static String readUnicodeLE(LittleEndianInput in, int nChars) | |
| readUnicodeString | back to summary |
|---|---|
| public static String readUnicodeString(LittleEndianInput in) InputStream
This structure is also known as a XLUnicodeString. | |
| readUnicodeString | back to summary |
|---|---|
| public static String readUnicodeString(LittleEndianInput in, int nChars) InputStream
This method should be used when the nChars field is not stored as a ushort immediately before the is16BitFlag. Otherwise, readUnicodeString(LittleEndianInput) can be used.
| |
| repeat | back to summary |
|---|---|
| public static String repeat(final char ch, final int repeat) Returns padding using the specified delimiter repeated to a given length.
StringUtil.repeat('e', 0) = ""
StringUtil.repeat('e', 3) = "eee"
StringUtil.repeat('e', -2) = ""
Note this method does not support padding with
Unicode Supplementary Characters
as they require a pair of
| |
| setMaxRecordLength | back to summary |
|---|---|
public static void setMaxRecordLength(int length)
| |
| startsWithIgnoreCase | back to summary |
|---|---|
| public static boolean startsWithIgnoreCase(String haystack, String prefix) Tests if the string starts with the specified prefix, ignoring case consideration. | |
| toLowerCase | back to summary |
|---|---|
public static String toLowerCase(char c)
| |
| toUpperCase | back to summary |
|---|---|
public static String toUpperCase(char c)
| |
| writeUnicodeString | back to summary |
|---|---|
| public static void writeUnicodeString(LittleEndianOutput out, String value) OutputStream
| |
| writeUnicodeStringFlagAndData | back to summary |
|---|---|
| public static void writeUnicodeStringFlagAndData(LittleEndianOutput out, String value) OutputStream
This method should be used when the nChars field is not stored as a ushort immediately before the is16BitFlag. Otherwise, writeUnicodeString(LittleEndianOutput, String) can be used.
| |