public void writeContentLengthHeader(Channel ctx, int len) { impl.writeContentLengthHeader(ctx, len); }
void writeContentLengthAndBody(final MaybeReq req, final Channel ctx, final byte[] body) { writeContentLengthHeader(ctx, body.length); closeHeaders(req, ctx.output()); ctx.write(body); }
void writeContentLengthAndBody(final MaybeReq req, final Channel ctx, final ByteArrayOutputStream body) { writeContentLengthHeader(ctx, body.size()); closeHeaders(req, ctx.output()); ctx.output().append(body); }
writeContentLengthHeader(channel, body.length()); closeHeaders(maybeReq, output); body.writeTo(channel);
private void writeJsonResponse(MaybeReq req, Resp resp, Channel ctx, boolean isKeepAlive, int code, MediaType contentType, Object result) { startResponse(resp, ctx, code, isKeepAlive, contentType); RapidoidThreadLocals locals = Msc.locals(); ReusableWritable out = locals.jsonRenderingStream(); // FIXME headers JSON.stringify(result, out); writeContentLengthHeader(ctx, out.size()); closeHeaders(req, ctx.output()); ctx.write(out.array(), 0, out.size()); }
public void writeContentLengthHeader(Channel ctx, int len) { impl.writeContentLengthHeader(ctx, len); }
void writeContentLengthAndBody(final MaybeReq req, final Channel ctx, final ByteArrayOutputStream body) { writeContentLengthHeader(ctx, body.size()); closeHeaders(req, ctx.output()); ctx.output().append(body); }
void writeContentLengthAndBody(final MaybeReq req, final Channel ctx, final byte[] body) { writeContentLengthHeader(ctx, body.length); closeHeaders(req, ctx.output()); ctx.write(body); }
writeContentLengthHeader(channel, body.length()); closeHeaders(maybeReq, output); body.writeTo(channel);
private void writeJsonResponse(MaybeReq req, Resp resp, Channel ctx, boolean isKeepAlive, int code, MediaType contentType, Object result) { startResponse(resp, ctx, code, isKeepAlive, contentType); RapidoidThreadLocals locals = Msc.locals(); ReusableWritable out = locals.jsonRenderingStream(); // FIXME headers JSON.stringify(result, out); writeContentLengthHeader(ctx, out.size()); closeHeaders(req, ctx.output()); ctx.write(out.array(), 0, out.size()); }