Construct StringBuilder in StreamUtils with appropriate initial size

Closes gh-25789
This commit is contained in:
Juergen Hoeller
2020-10-07 15:08:39 +02:00
parent 6124a3f0ba
commit f4eefc62c1

View File

@@ -83,7 +83,7 @@ public abstract class StreamUtils {
return "";
}
StringBuilder out = new StringBuilder();
StringBuilder out = new StringBuilder(BUFFER_SIZE);
InputStreamReader reader = new InputStreamReader(in, charset);
char[] buffer = new char[BUFFER_SIZE];
int charsRead;