Encoding and decoding of InternetAddress objects