public void write(final int i) throws IOException {
            if (byteArrayOutputStream.size() <= maxEntitySize) {
                byteArrayOutputStream.write(i);
            }
            out.write(i);
        }
Write the contents of a request/response body, up to a certain length
stroom-util/src/main/java/stroom/util/logging/DefaultLoggingFilter.java