question: public static byte [ ] changeEncoding ( byte [ ] byteArray , Charset charsetFrom , Charset charsetTo ) { ByteBuffer inputBuffer = ByteBuffer . wrap ( byteArray ) ; CharBuffer data = charsetFrom . decode ( inputBuffer ) ; ByteBuffer outputBuffer = charsetTo . encode ( data ) ; return outputBuffer . array ( ) ; }
target:  Usage: Charset charsetFrom = Charset.forName("UTF-8"); Charset charsetTo = Charset.forName("ISO-8859-15");