To correct the deprecated methods one needs to use the
String constructor which allows for the encoding to be specified. By using the
public String(byte[] bytes,
int offset,
int length,
String enc)
throws UnsupportedEncodingException
constrcutor. I note that it also throws an IndexOutOfBoundsException.
My question is where do people consider the best place to catch and handle this exception???