diff --git a/buffer/src/main/java/io/netty/buffer/DuplicatedByteBuf.java b/buffer/src/main/java/io/netty/buffer/DuplicatedByteBuf.java index 5727c58376..320c62192d 100644 --- a/buffer/src/main/java/io/netty/buffer/DuplicatedByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/DuplicatedByteBuf.java @@ -291,5 +291,10 @@ public class DuplicatedByteBuf extends AbstractDerivedByteBuf { public ByteBuffer internalNioBuffer(int index, int length) { return buffer.internalNioBuffer(index, length); } + + @Override + public int forEachByte(int fromIndex, int toIndex, ByteBufProcessor processor) { + return buffer.forEachByte(fromIndex, toIndex, processor); + } } diff --git a/buffer/src/main/java/io/netty/buffer/ReadOnlyByteBuf.java b/buffer/src/main/java/io/netty/buffer/ReadOnlyByteBuf.java index 2041a5484d..4479a74611 100644 --- a/buffer/src/main/java/io/netty/buffer/ReadOnlyByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/ReadOnlyByteBuf.java @@ -295,6 +295,11 @@ public class ReadOnlyByteBuf extends AbstractDerivedByteBuf { return buffer.internalNioBuffer(index, length); } + @Override + public int forEachByte(int fromIndex, int toIndex, ByteBufProcessor processor) { + return buffer.forEachByte(fromIndex, toIndex, processor); + } + @Override public int capacity() { return buffer.capacity(); diff --git a/buffer/src/main/java/io/netty/buffer/SlicedByteBuf.java b/buffer/src/main/java/io/netty/buffer/SlicedByteBuf.java index 81a0fecb7a..2ed4aa171c 100644 --- a/buffer/src/main/java/io/netty/buffer/SlicedByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/SlicedByteBuf.java @@ -273,4 +273,9 @@ public class SlicedByteBuf extends AbstractDerivedByteBuf { checkIndex(index, length); return buffer.internalNioBuffer(index + adjustment, length); } + + @Override + public int forEachByte(int fromIndex, int toIndex, ByteBufProcessor processor) { + return buffer.forEachByte(fromIndex + adjustment, toIndex + adjustment, processor); + } }