@Override public HttpEntity build() { return new ByteBufHttpEntity(byteByf, contentLength, getContentType()); }
public ByteBufHttpEntity(ByteBuf byteBuf, long length, ContentType contentType) { this.content = Args.notNull(byteBuf, "Source input stream"); this.length = length; if (contentType != null) { setContentType(contentType.toString()); } }