public static ByteSource bytes(char[] chars) {
            return new SimpleByteSource(chars);
        }
Returns a new {@code ByteSource} instance representing the specified character array's bytes.  The byte
array is obtained assuming {@code UTF-8} encoding.

@param chars the character array to represent as a {@code ByteSource} instance.
@return a new {@code ByteSource} instance representing the specified character array's bytes.
lang/src/main/java/org/apache/shiro/lang/util/ByteSource.java