public void closeChunked( Request playRequest, Response playResponse, ChannelHandlerContext ctx, HttpRequest nettyRequest) { try { ((LazyChunkedInput) playResponse.direct).close(); chunkedWriteHandler.resumeTransfer(); } catch (Exception e) { throw new UnexpectedException(e); } }
public void writeChunk( Request playRequest, Response playResponse, ChannelHandlerContext ctx, HttpRequest nettyRequest, Object chunk) { try { if (playResponse.direct == null) { playResponse.setHeader("Transfer-Encoding", "chunked"); playResponse.direct = new LazyChunkedInput(); copyResponse(ctx, playRequest, playResponse, nettyRequest); } ((LazyChunkedInput) playResponse.direct).writeChunk(chunk); chunkedWriteHandler.resumeTransfer(); } catch (Exception e) { throw new UnexpectedException(e); } }