CodecSupport.toBytes

Converts the specified character array to a byte array using the Shiro's preferred encoding (UTF-8). <p/> This is a convenience method equivalent to calling the {@link #toBytes(String,String)} method with a a wrapping String and {@link CodecSupport#PREFERRED_ENCODING PREFERRED_ENCODING}, i.e. <p/> <code>toBytes( new String(chars), {@link CodecSupport#PREFERRED_ENCODING PREFERRED_ENCODING} );</code>

@param chars the character array to be converted to a byte array. @return the byte array of the UTF-8 encoded character array.

  1. byte[] toBytes(char[] chars)
    class CodecSupport
    static
    byte[]
    toBytes
    (
    char[] chars
    )
  2. byte[] toBytes(Object o)

Meta