com.tibbo.aggregate.common.util

## Class StringUtils

- java.lang.Object
- - com.tibbo.aggregate.common.util.StringUtils

-     public class StringUtils
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.nio.charset.Charset` | `ASCII_CHARSET`
    `static java.lang.String` | `DEFAULT_COLLECTION_PRINT_SEPARATOR`
    `static java.lang.String` | `DEFAULT_MAP_KEY_VALUE_SEPARATOR`
    `static java.nio.charset.Charset` | `UTF8_CHARSET`
    `static java.nio.charset.Charset` | `WINDOWS_1251_CHARSET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StringUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `appendLine(java.lang.StringBuilder sb, java.lang.String s)`
    `static java.lang.String` | `byteToHexString(int i)`
    `static java.lang.String` | `colorToString(java.awt.Color color)`
    `static java.lang.String` | `createMaskedPasswordString(int length)`
    `static ElementList` | `elements(java.lang.String source, boolean useVisibleSeparators)`
    `static java.lang.String` | `escapeHtml(java.lang.String text)`
    `static java.lang.String` | `fromHexString(java.lang.String hexString, java.lang.String separator)`
    `static java.util.Map<java.lang.String,java.lang.String>` | `getEncodings()`
    `static boolean` | `isEmpty(java.lang.String text)`
    `static boolean` | `isPureAscii(java.lang.String v)`
    `static java.lang.String` | `makeName(java.lang.String source, int maxLength)`
    `static java.lang.String` | `print(java.util.Collection col)`
    `static java.lang.String` | `print(java.util.Collection col, java.lang.String separator)`
    `static java.lang.String` | `print(java.util.Collection col, java.lang.String separator, boolean skipNullElements)`
    `static java.lang.String` | `print(java.util.Collection col, java.lang.String separator, java.lang.String escaper, boolean skipNullElements)`
    `static java.lang.String` | `print(java.util.Map map)`
    `static java.lang.String` | `print(java.util.Map<java.lang.Object,java.lang.Object> map, java.lang.String separator, java.lang.String keyValueSeparator, boolean skipNullKeys)`
    `static java.lang.String` | `print(java.lang.Object[] array)`
    `static java.lang.String` | `print(java.lang.Object[] array, java.lang.String separator)`
    `static java.lang.String` | `remoteNonDigits(java.lang.String src)`
    `static byte[]` | `removeBOM(byte[] utf8ByteArray)`
    `static java.lang.String` | `removeSuffix(java.lang.String src, java.lang.String suffix)`
    `static java.util.List<java.lang.String>` | `split(java.lang.String str, char ch)`
    `static java.lang.String` | `splitCapitalLetters(java.lang.String str)`
    `static java.lang.String` | `streamToString(java.io.InputStream is, java.lang.String charsetName)`
    `static java.lang.String` | `toHexString(byte[] byteArray)`
    `static java.lang.String` | `toHexString(byte[] byteArray, java.lang.String separator)`
    `static java.lang.String` | `truncate(java.lang.String str, int maxLength)`
    `static java.lang.String` | `truncate(java.lang.String str, int maxLength, java.lang.String suffix)`
    `static java.util.List<java.lang.String>` | `wrapText(java.lang.String text, int len)`
    `static java.lang.String` | `wrapText(java.lang.String text, int len, java.lang.String separator)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### UTF8_CHARSET

          public static final java.nio.charset.Charset UTF8_CHARSET

    - #### ASCII_CHARSET

          public static final java.nio.charset.Charset ASCII_CHARSET

    - #### WINDOWS_1251_CHARSET

          public static final java.nio.charset.Charset WINDOWS_1251_CHARSET

    - #### DEFAULT_COLLECTION_PRINT_SEPARATOR

          public static final java.lang.String DEFAULT_COLLECTION_PRINT_SEPARATOR

      See Also:
        Constant Field Values

    - #### DEFAULT_MAP_KEY_VALUE_SEPARATOR

          public static final java.lang.String DEFAULT_MAP_KEY_VALUE_SEPARATOR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### StringUtils

          public StringUtils()

  - ### Method Detail

    - #### truncate

          public static java.lang.String truncate(java.lang.String str,
                                                  int maxLength)

    - #### truncate

          public static java.lang.String truncate(java.lang.String str,
                                                  int maxLength,
                                                  java.lang.String suffix)

    - #### byteToHexString

          public static java.lang.String byteToHexString(int i)

    - #### colorToString

          public static java.lang.String colorToString(java.awt.Color color)

    - #### elements

          public static ElementList elements(java.lang.String source,
                                             boolean useVisibleSeparators)

    - #### escapeHtml

          public static java.lang.String escapeHtml(java.lang.String text)

    - #### createMaskedPasswordString

          public static java.lang.String createMaskedPasswordString(int length)

    - #### print

          public static java.lang.String print(java.util.Collection col)

    - #### print

          public static java.lang.String print(java.util.Collection col,
                                               java.lang.String separator)

    - #### print

          public static java.lang.String print(java.util.Collection col,
                                               java.lang.String separator,
                                               boolean skipNullElements)

    - #### print

          public static java.lang.String print(java.util.Collection col,
                                               java.lang.String separator,
                                               java.lang.String escaper,
                                               boolean skipNullElements)

    - #### print

          public static java.lang.String print(java.util.Map map)

    - #### print

          public static java.lang.String print(java.util.Map<java.lang.Object,java.lang.Object> map,
                                               java.lang.String separator,
                                               java.lang.String keyValueSeparator,
                                               boolean skipNullKeys)

    - #### print

          public static java.lang.String print(java.lang.Object[] array)

    - #### print

          public static java.lang.String print(java.lang.Object[] array,
                                               java.lang.String separator)

    - #### removeBOM

          public static byte[] removeBOM(byte[] utf8ByteArray)

    - #### remoteNonDigits

          public static java.lang.String remoteNonDigits(java.lang.String src)

    - #### removeSuffix

          public static java.lang.String removeSuffix(java.lang.String src,
                                                      java.lang.String suffix)

    - #### split

          public static java.util.List<java.lang.String> split(java.lang.String str,
                                                               char ch)

    - #### streamToString

          public static java.lang.String streamToString(java.io.InputStream is,
                                                        java.lang.String charsetName)
                                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### wrapText

          public static java.util.List<java.lang.String> wrapText(java.lang.String text,
                                                                  int len)

    - #### wrapText

          public static java.lang.String wrapText(java.lang.String text,
                                                  int len,
                                                  java.lang.String separator)

    - #### appendLine

          public static void appendLine(java.lang.StringBuilder sb,
                                        java.lang.String s)

    - #### makeName

          public static java.lang.String makeName(java.lang.String source,
                                                  int maxLength)

    - #### isPureAscii

          public static boolean isPureAscii(java.lang.String v)

    - #### isEmpty

          public static boolean isEmpty(java.lang.String text)

    - #### getEncodings

          public static java.util.Map<java.lang.String,java.lang.String> getEncodings()

    - #### splitCapitalLetters

          public static java.lang.String splitCapitalLetters(java.lang.String str)

    - #### toHexString

          public static java.lang.String toHexString(byte[] byteArray)

    - #### toHexString

          public static java.lang.String toHexString(byte[] byteArray,
                                                     java.lang.String separator)

    - #### fromHexString

          public static java.lang.String fromHexString(java.lang.String hexString,
                                                       java.lang.String separator)