String msg = "RECV " + packetId.name();
if(Out.isDebug()) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try (BNetOutputStream os = new BNetOutputStream(baos)) {
os.writeWord(packetLength);
os.writeByte(packetId.ordinal());
os.write(data);
}
msg += "\n" + HexDump.hexDump(baos.toByteArray());
}
Out.debugAlways(getClass(), msg);