Details
Description
The processing for toString() in the Url class is a bit expensive. I think we can do better by using String concatenation, avoiding copying byte[]/char[] arrays, and sizing StringBuilders effectively.
More could be done to improve this, but these changes are not too aggressive. Ideally a common StringBuilder would be passed around, like the charset, to accumulate the String as processing is done.