I am trying the below code :-
private Charset charset = Charset.forName("UTF-8");
String decryptedtext = new String(decryptedValue, charset);
where decryptedValue is of type byte[] but the above code is not working for java 1.5 version. I am getting the error as below :-
> ERROR: symbol : constructor String(byte[],java.nio.charset.Charset)
> ERROR: location: class java.lang.String
> ERROR: String decryptedtext = new String(decryptedValue, charset);
> ERROR: ^
Can anyone help me on this ?
Apologies in advance if this is a repetitive or duplicate question.
String: docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html