String s = "abc"; // string -> byte[] byte [] b = s.getBytes( "8859_1" /* encoding */ ); // byte[] -> String String t = new String( byteArray, "Cp1252" /* encoding */ ); // subset of byte[] -> String String t = new String( byteArray, offset, length, "UTF-8" /* encoding */ );