The encoding methods always create ByteArrayOutputStream for each input String, even dropping that in case the source String was traversed without a single character being encoded. As the values usually passed into such methods are usually designed to be used in URIs (e.g. (numeric) identifiers), chances are high that the method is called a lot with sources that don't have to be encoded in the first place.
The encoding methods always create
ByteArrayOutputStreamfor each input String, even dropping that in case the source String was traversed without a single character being encoded. As the values usually passed into such methods are usually designed to be used in URIs (e.g. (numeric) identifiers), chances are high that the method is called a lot with sources that don't have to be encoded in the first place.