/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans. */ public static String prettyHexDump(ByteBuf buffer) { return prettyHexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans. */ public static String prettyHexDump(ByteBuf buffer) { return prettyHexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans. */ public static String prettyHexDump(ByteBuf buffer) { return prettyHexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
@Override protected final void encode(final ChannelHandlerContext context, final T message, final ByteBuf out) { doEncode(context, message, out); if (log.isDebugEnabled()) { log.debug("Write to client {} : \n {}", context.channel().id().asShortText(), ByteBufUtil.prettyHexDump(out)); } }
@Override protected final void encode(final ChannelHandlerContext context, final T message, final ByteBuf out) { doEncode(context, message, out); if (log.isDebugEnabled()) { log.debug("Write to client {} : \n {}", context.channel().id().asShortText(), ByteBufUtil.prettyHexDump(out)); } }
@Override public String toString() { StringBuilder sb = new StringBuilder("\n"); sb.append(header().prettyHexDump()).append("\n"); sb.append("\nTemplates:\n"); templates().forEach((integer, byteBuf) -> { sb.append("\n").append(integer).append(":\n").append(ByteBufUtil.prettyHexDump(Unpooled.wrappedBuffer(byteBuf))); }); final Map.Entry<Integer, byte[]> optionTemplate = optionTemplate(); if (optionTemplate != null) { sb.append("\nOption Template:\n").append(ByteBufUtil.prettyHexDump(Unpooled.wrappedBuffer(optionTemplate.getValue()))); } sb.append("\nData flows using these templates:\n"); usedTemplates().forEach(templateId -> sb.append(templateId).append(" ")); return sb.toString(); } }
@Override protected final void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out) { int readableBytes = in.readableBytes(); if (!isValidHeader(readableBytes)) { return; } if (log.isDebugEnabled()) { log.debug("Read from client {} : \n {}", context.channel().id().asShortText(), ByteBufUtil.prettyHexDump(in)); } doDecode(context, in, out, readableBytes); }
@Override protected final void decode(final ChannelHandlerContext context, final ByteBuf in, final List<Object> out) { int readableBytes = in.readableBytes(); if (!isValidHeader(readableBytes)) { return; } if (log.isDebugEnabled()) { log.debug("Read from client {} : \n {}", context.channel().id().asShortText(), ByteBufUtil.prettyHexDump(in)); } doDecode(context, in, out, readableBytes); }
public String prettyHexDump() { final ByteBuf buffer = Unpooled.buffer(20); try { buffer.writeShort(version()); buffer.writeShort(count()); buffer.writeInt(Math.toIntExact(sysUptime())); buffer.writeInt(Math.toIntExact(unixSecs())); buffer.writeInt(Math.toIntExact(sequence())); buffer.writeInt(Math.toIntExact(sourceId())); return ByteBufUtil.prettyHexDump(buffer); } finally { ReferenceCountUtil.release(buffer); } } }
LOG.error("Error parsing NetFlow packet <{}> received from <{}>", rawMessage.getId(), rawMessage.getRemoteAddress(), e); if (LOG.isDebugEnabled()) { LOG.debug("NetFlow packet hexdump:\n{}", ByteBufUtil.prettyHexDump(Unpooled.wrappedBuffer(rawMessage.getPayload())));
LOG.trace("Received V9 packet:\n{}", ByteBufUtil.prettyHexDump(buf));
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans. */ public static String prettyHexDump(ByteBuf buffer) { return prettyHexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
@Override protected String fallbackToStringOf(Object object) { if (object instanceof ByteBuf) { return ByteBufUtil.prettyHexDump((ByteBuf) object); } return super.fallbackToStringOf(object); } }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans, * starting at the given {@code offset} using the given {@code length}. */ public static String prettyHexDump(ByteBuf buffer, int offset, int length) { return HexUtil.prettyHexDump(buffer, offset, length); }
/** * Returns a multi-line hexadecimal dump of the specified {@link ByteBuf} that is easy to read by humans. */ public static String prettyHexDump(ByteBuf buffer) { return prettyHexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }