} else {
buf = ChannelBuffers.copiedBuffer(response.content(), 0, response.contentLength());
}
}
} catch (IOException e) {
throw new HttpException("Failed to convert response to bytes", e);
}
if (response.prefixContent() != null || response.suffixContent() != null) {
ChannelBuffer prefixBuf = ChannelBuffers.EMPTY_BUFFER;
if (response.prefixContent() != null) {
prefixBuf = ChannelBuffers.copiedBuffer(response.prefixContent(), 0, response.prefixContentLength());