Created ByteInput#wrap(ByteBuf)

This commit is contained in:
Collin Smith 2020-08-19 21:15:45 -07:00
parent c7123a63f4
commit 1bd32e777d

View File

@ -29,6 +29,10 @@ public class ByteInput {
return bytes == null ? emptyByteInput() : new ByteInput(Unpooled.wrappedBuffer(bytes).asReadOnly());
}
public static ByteInput wrap(ByteBuf buffer) {
return new ByteInput(buffer.asReadOnly());
}
private final ByteBuf buffer;
private final int offset;
private int mark;