/** * Construct a new data message. * * @param content non-{@code null} payload * @param endStream whether this data should terminate the stream * @param padding additional bytes that should be added to obscure the true content size. Must be between 0 and * 256 (inclusive). */ public DefaultHttp2DataFrame(ByteBuf content, boolean endStream, int padding) { this.content = checkNotNull(content, "content"); this.endStream = endStream; verifyPadding(padding); this.padding = padding; if (content().readableBytes() + (long) padding > Integer.MAX_VALUE) { throw new IllegalArgumentException("content + padding must be <= Integer.MAX_VALUE"); } initialFlowControlledBytes = content().readableBytes() + padding; }
@Override public DefaultHttp2DataFrame duplicate() { return replace(content().duplicate()); }
@Override public boolean equals(Object o) { if (!(o instanceof DefaultHttp2DataFrame)) { return false; } DefaultHttp2DataFrame other = (DefaultHttp2DataFrame) o; return super.equals(other) && content.equals(other.content()) && endStream == other.endStream && padding == other.padding; }
@Override public DefaultHttp2DataFrame copy() { return replace(content().copy()); }
@Override public DefaultHttp2DataFrame retainedDuplicate() { return replace(content().retainedDuplicate()); }
/** * Construct a new data message. * * @param content non-{@code null} payload * @param endStream whether this data should terminate the stream * @param padding additional bytes that should be added to obscure the true content size. Must be between 0 and * 256 (inclusive). */ public DefaultHttp2DataFrame(ByteBuf content, boolean endStream, int padding) { this.content = checkNotNull(content, "content"); this.endStream = endStream; verifyPadding(padding); this.padding = padding; if (content().readableBytes() + (long) padding > Integer.MAX_VALUE) { throw new IllegalArgumentException("content + padding must be <= Integer.MAX_VALUE"); } initialFlowControlledBytes = content().readableBytes() + padding; }
/** * Construct a new data message. * * @param content non-{@code null} payload * @param endStream whether this data should terminate the stream * @param padding additional bytes that should be added to obscure the true content size. Must be between 0 and * 256 (inclusive). */ public DefaultHttp2DataFrame(ByteBuf content, boolean endStream, int padding) { this.content = checkNotNull(content, "content"); this.endStream = endStream; verifyPadding(padding); this.padding = padding; if (content().readableBytes() + (long) padding > Integer.MAX_VALUE) { throw new IllegalArgumentException("content + padding must be <= Integer.MAX_VALUE"); } initialFlowControlledBytes = content().readableBytes() + padding; }
@Override public boolean equals(Object o) { if (!(o instanceof DefaultHttp2DataFrame)) { return false; } DefaultHttp2DataFrame other = (DefaultHttp2DataFrame) o; return super.equals(other) && content.equals(other.content()) && endStream == other.endStream && padding == other.padding; }
@Override public DefaultHttp2DataFrame retainedDuplicate() { return replace(content().retainedDuplicate()); }
@Override public boolean equals(Object o) { if (!(o instanceof DefaultHttp2DataFrame)) { return false; } DefaultHttp2DataFrame other = (DefaultHttp2DataFrame) o; return super.equals(other) && content.equals(other.content()) && endStream == other.endStream && padding == other.padding; }
@Override public DefaultHttp2DataFrame retainedDuplicate() { return replace(content().retainedDuplicate()); }
@Override public DefaultHttp2DataFrame duplicate() { return replace(content().duplicate()); }
@Override public DefaultHttp2DataFrame copy() { return replace(content().copy()); }
@Override public DefaultHttp2DataFrame copy() { return replace(content().copy()); }
@Override public DefaultHttp2DataFrame duplicate() { return replace(content().duplicate()); }
inboundChannel = ClientToProxyChannels.clientToProxyChannelMap.get(dataFrame.streamId()); msg = new DefaultHttp2DataFrame(dataFrame.content(), dataFrame.isEndStream(), dataFrame.padding()).streamId (streamId);
} else if (msg instanceof DefaultHttp2DataFrame) { DefaultHttp2DataFrame dataFrame = (DefaultHttp2DataFrame) msg; msg = new DefaultHttp2DataFrame(dataFrame.content(), dataFrame.isEndStream(), dataFrame.padding()).streamId (streamId); } else {