question: public static ByteBuffer encode ( String string ) throws CharacterCodingException { return encode ( string , true ) ; }
target:  Converts the provided String to bytes using the UTF-8 encoding. If the input is malformed, invalid chars are replaced by a default value.