From: thomas at tada.se (Thomas Hallgren) Date: Fri, 22 Sep 2006 10:54:46 +0200 Subject: [Pljava-dev] readBytes() / writeBytes() In-Reply-To: <4513A371.1050401@logix-tt.com> References: <4512F5E4.9060600@logix-tt.com> <45139C17.3050006@tada.se> <4513A107.4060809@logix-tt.com> <4513A371.1050401@logix-tt.com> Message-ID: <4513A4D6.7060900@tada.se> Markus Schaber wrote: > Sadly, there are no examples for custom datatypes with variable size, so > I've to extrapolate from the given fixed-length examples, and the > details I know about the C implementation of variable-sized datatypes. > AFAIK, they all start with a 4 byte header denoting the length. So your mapping starts by doing a readInt() and then you base the rest on that. Regards, Thomas Hallgren