diff --git a/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java b/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java index dc442e01e0..8a3e4a3f43 100644 --- a/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java +++ b/codec/src/main/java/io/netty/handler/codec/ReplayingDecoder.java @@ -40,21 +40,21 @@ import java.util.List; * * {@code @Override} * protected void decode({@link ChannelHandlerContext} ctx, - * {@link ByteBuf} in, List<Object> out) throws Exception { + * {@link ByteBuf} buf, List<Object> out) throws Exception { * - * if (in.readableBytes() < 4) { + * if (buf.readableBytes() < 4) { * return; * } * - * in.markReaderIndex(); - * int length = in.readInt(); + * buf.markReaderIndex(); + * int length = buf.readInt(); * - * if (in.readableBytes() < length) { - * in.resetReaderIndex(); + * if (buf.readableBytes() < length) { + * buf.resetReaderIndex(); * return; * } * - * out.add(in.readBytes(length)); + * out.add(buf.readBytes(length)); * } * } * @@ -108,11 +108,11 @@ import java.util.List; * private final Queue<Integer> values = new LinkedList<Integer>(); * * {@code @Override} - * public void decode(.., {@link ByteBuf} in, List<Object> out) throws Exception { + * public void decode(.., {@link ByteBuf} buf, List<Object> out) throws Exception { * * // A message contains 2 integers. - * values.offer(buffer.readInt()); - * values.offer(buffer.readInt()); + * values.offer(buf.readInt()); + * values.offer(buf.readInt()); * * // This assertion will fail intermittently since values.offer() * // can be called more than two times! @@ -128,15 +128,15 @@ import java.util.List; * private final Queue<Integer> values = new LinkedList<Integer>(); * * {@code @Override} - * public void decode(.., {@link ByteBuf} buffer, List<Object> out) throws Exception { + * public void decode(.., {@link ByteBuf} buf, List<Object> out) throws Exception { * * // Revert the state of the variable that might have been changed * // since the last partial decode. * values.clear(); * * // A message contains 2 integers. - * values.offer(buffer.readInt()); - * values.offer(buffer.readInt()); + * values.offer(buf.readInt()); + * values.offer(buf.readInt()); * * // Now we know this assertion will never fail. * assert values.size() == 2; @@ -181,7 +181,7 @@ import java.util.List; * * {@code @Override} * protected void decode({@link ChannelHandlerContext} ctx, - * {@link ByteBuf} in, List<Object> out) throws Exception { + * {@link ByteBuf} buf, List<Object> out) throws Exception { * switch (state()) { * case READ_LENGTH: * length = buf.readInt(); @@ -209,7 +209,7 @@ import java.util.List; * * {@code @Override} * protected void decode({@link ChannelHandlerContext} ctx, - * {@link ByteBuf} in, List<Object> out) throws Exception { + * {@link ByteBuf} buf, List<Object> out) throws Exception { * if (!readLength) { * length = buf.readInt(); * readLength = true; @@ -240,7 +240,7 @@ import java.util.List; * * {@code @Override} * protected Object decode({@link ChannelHandlerContext} ctx, - * {@link ByteBuf} in, List<Object> out) { + * {@link ByteBuf} buf, List<Object> out) { * ... * // Decode the first message * Object firstMessage = ...;