I have a line of code in java that am using to get ascii representation of a string and then extract the bytes to a buffer. but, after processing the bytes, the resulting bytes array kind of double in size.
byte[] id = {1, 64, 71, -17, -65, -67};
ByteBuf response = Unpooled.buffer();
response.writeBytes(ByteBufUtil.hexDump(id).getBytes(StandardCharsets.US_ASCII));
response.readableBytes(); //12
response: {48, 49, 52, 48, 52, 55, 101, 102, 98, 102, 98, 100}
so am confused as to how 6bytes became 12 bytes... not that i really care about the size, but am trying to do the same in python, and annoyingly the message length gets inconsistent..