< prev index next >
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Stream.java
Print this page
@@ -765,11 +765,11 @@
DataFrame getDataFrame(ByteBuffer buffer) {
int requestAmount = Math.min(connection.getMaxSendFrameSize(), buffer.remaining());
// blocks waiting for stream send window, if exhausted
int actualAmount = windowController.tryAcquire(requestAmount, streamid, this);
if (actualAmount <= 0) return null;
- ByteBuffer outBuf = Utils.slice(buffer, actualAmount);
+ ByteBuffer outBuf = Utils.sliceWithLimitedCapacity(buffer, actualAmount);
DataFrame df = new DataFrame(streamid, 0 , outBuf);
return df;
}
private DataFrame getEmptyEndStreamDataFrame() {
< prev index next >