Datagram fixes for Java 6.