Construct StringBuilder in StreamUtils with appropriate initial size
Closes gh-25789
This commit is contained in:
parent
eb11c6fa23
commit
ec9de943ee
|
@ -84,7 +84,7 @@ public abstract class StreamUtils {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder out = new StringBuilder();
|
StringBuilder out = new StringBuilder(BUFFER_SIZE);
|
||||||
InputStreamReader reader = new InputStreamReader(in, charset);
|
InputStreamReader reader = new InputStreamReader(in, charset);
|
||||||
char[] buffer = new char[BUFFER_SIZE];
|
char[] buffer = new char[BUFFER_SIZE];
|
||||||
int charsRead;
|
int charsRead;
|
||||||
|
|
Loading…
Reference in New Issue