public static void closePayloadAndPublish(
HTTPUtilResponse that,
byte[] eTag, HTTPContentType contentTypeEnum,
Pipe<ServerResponseSchema> output,
long activeChannelId, int activeSequenceNo, int activeFieldRequestContext,
ChannelWriter outputStream,
HeaderWritable additionalHeaderWriter, int status) {
storeChnlAndSeqInHeaderFragment(that, output, activeChannelId, activeSequenceNo);
byte[] contentType = null!=contentTypeEnum ? contentTypeEnum.getBytes() : null;
int totalLengthWritten = outputStream.length();
output.closeBlobFieldWrite();
HTTPUtil.prependBodyWithHeader(output,
eTag, totalLengthWritten, that, activeFieldRequestContext,
activeChannelId, activeSequenceNo, contentType,
additionalHeaderWriter, status);
}