Hi,
I've attached the modified DNSInput class.
Also, the following constructor must be added to Message:
/**
* Creates a new Message from its DNS wire format representation
* @param byteBuffer A ByteBuffer containing the DNS Message.
*/
public
Message(ByteBuffer byteBuffer) throws IOException {
this(new DNSInput(byteBuffer));
}
The modified DNSInput class simply uses a ByteBuffer instead of using a byte array directly. All changes are backward compatible.
If the changes may be incorporated to the public sources ASAP that would be great.
Thanks,
Mickael
Applied, with a few bug fixes (the DNSInput readU16() and read32() methods need to return unsigned types, not signed types).
Ticket moved from /p/dnsjava/patches/34/