code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit 0e055443 authored by Mathijs den Burger's avatar Mathijs den Burger

CMS7-16: make read buf size a private constant

parent 44817451
......@@ -28,6 +28,7 @@ import org.slf4j.LoggerFactory;
class AutoReloadScriptLoader {
private static final String AUTO_RELOAD_SCRIPT = "autoreload.js";
private static final int READ_BUF_SIZE = 1024;
private static final Logger log = LoggerFactory.getLogger(AutoReloadScriptLoader.class);
......@@ -54,7 +55,7 @@ class AutoReloadScriptLoader {
private String readString(final InputStream in, final String encoding) throws IOException {
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final byte[] buffer = new byte[1024];
final byte[] buffer = new byte[READ_BUF_SIZE];
int length;
while ((length = in.read(buffer)) != -1) {
out.write(buffer, 0, length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment