decode() has this section at the end of it:
// Undo conversion to external encoding
String result = sb.toString();
byte[] inputBytes = result.getBytes("8859_1");
return new String(inputBytes);
but URLEncoder.encode() OutputStreamWriter() uses the default constructor
so it does not specify what the charset used is, so it is not necessarily
have to be 8859_1. Since URLEncoder.encode() is 'supposedly' just taking
the low 8bits and encoding them, and this is just reversing that, then
this step is not needed. The end of this function should just be:
return sb.toString();