mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8316681: Rewrite URLEncoder.encode to use small reusable buffers
Reviewed-by: dfuchs, rriggs
This commit is contained in:
parent
bd2439f3fc
commit
c24c66db97
4 changed files with 82 additions and 19 deletions
|
@ -679,9 +679,8 @@ public final class HexFormat {
|
|||
* @throws UncheckedIOException if an I/O exception occurs appending to the output
|
||||
*/
|
||||
public <A extends Appendable> A toHexDigits(A out, byte value) {
|
||||
Objects.requireNonNull(out, "out");
|
||||
try {
|
||||
out.append(toHighHexDigit(value));
|
||||
out.append(toHighHexDigit(value)); // implicit null-check
|
||||
out.append(toLowHexDigit(value));
|
||||
return out;
|
||||
} catch (IOException ioe) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue