def writeToFile(self, f):
   proto = OuterProto.new_message()
   self.write(proto)
   proto.write(f)