/** * display the hex data of {@link Bytes} from the position() to the limit() * * @return hex representation of the buffer, from example [0D ,OA, FF] */ @NotNull default String toHexString() { return toHexString(1024); }
@NotNull static BytesParselet createDefaultParselet() { return (msg, in) -> { Bytes bytes = (Bytes) in; throw new IllegalArgumentException("Unknown message type " + msg + " " + bytes.toHexString()); }; }
/** * display the hex data of {@link Bytes} from the position() to the limit() * * @param maxLength limit the number of bytes to be dumped. * @return hex representation of the buffer, from example [0D ,OA, FF] */ @NotNull default String toHexString(long maxLength) { return toHexString(readPosition(), maxLength); }
actual = bytes2.toHexString().trim(); if (afterRun != null) { expected = afterRun.apply(expected);
} catch (UTFDataFormatRuntimeException e) { long rp = Math.max(rp0 - 128, 0); throw new UTFDataFormatRuntimeException(Long.toHexString(rp0) + "\n" + bytes.toHexString(rp, 200));
} catch (Exception e) { @NotNull final String msg = dc.wire().bytes().toHexString(readPosition, dc.wire() .bytes() .readLimit() - readPosition);
Jvm.debug().on(getClass(), "received data:\n" + in.bytes().toHexString());
Jvm.debug().on(getClass(), "received meta-data:\n" + wire.bytes().toHexString());