question: public static byte [ ] encodingToBytes ( final String str , final String encoding ) { if ( str == null ) { return null ; } try { return str . getBytes ( encoding ) ; } catch ( final UnsupportedEncodingException e ) { throw new Error ( encoding + " not supported! Original exception: " + e ) ; } }
target:  Convert a String to a byte array using the specified encoding.