From: Robin Rosenberg Date: Wed, 18 Feb 2009 20:59:50 GMT Subject: Re: [JGIT PATCH] 1/2 : (reworked) Externalizable/Serializable Items Message-ID: <200902182159.51027.robin.rosenberg.lists@dewire.com> In-Reply-To: <20090218163002.GB22848@spearce.org> Shawn wrote: > > + os.writeUTF(KEY_FETCH); > > + os.writeUTF(refspec.toString()); > > + } > > + > > + for (RefSpec refspec : push) { > > + os.writeUTF(KEY_PUSH); > > + os.writeUTF(refspec.toString()); > > + } > > Should we maybe allow RefSpec to serialize itself with > os.writeObject() rather than using writeUTF() directly? Doesn't the style above make it easy to define and document a format that is easy for non-java programs to write and read, while writeObject introduces java-centric stuff (depending on the full class name etc). -- robin