if (source.length() < start) {
start = 0; // text rolled over
}
final CharSpool spool = new CharSpool();
long size = writeLogTo(start, spool);
// response.addHeader("X-Text-Size", String.valueOf(r));
// if (!completed) {
// response.addHeader("X-More-Data", "true");
// }
if (size < 10000) {
gzipOK = false;
}
final boolean gz = gzipOK;
ResponseBuilder rp = Response.ok(
new StreamingOutput() {
@Override
public void write(OutputStream out) throws IOException, WebApplicationException {
Writer w = getWriter(out, gz);
spool.writeTo(new LineEndNormalizingWriter(w));
w.flush();
w.close();
}
});
URI next = ui.getAbsolutePathBuilder().queryParam("start", size).build();