Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@

import java.nio.ByteBuffer;
import java.util.Objects;

import org.eclipse.jetty.io.Content;
import org.eclipse.jetty.io.Retainable;
import org.eclipse.jetty.util.BufferUtil;

public class ContentChunk implements Content.Chunk {
public class ContentChunk extends Retainable.ReferenceCounter implements Content.Chunk {
private final ByteBuffer byteBuffer;
private final boolean last;

public ContentChunk(ByteBuffer byteBuffer) {
this(byteBuffer, true);
}

public ContentChunk(byte[] bytes) {
this(BufferUtil.toBuffer(bytes), true);
}
Expand All @@ -48,16 +46,6 @@ public boolean isLast() {
return last;
}

@Override
public void retain() {
throw new UnsupportedOperationException();
}

@Override
public boolean release() {
return true;
}

@Override
public String toString() {

Expand Down