Add methods in Types and IO to write replies.