From: schabi at logix-tt.com (Markus Schaber) Date: Thu, 21 Sep 2006 22:28:20 +0200 Subject: [Pljava-dev] readBytes() / writeBytes() Message-ID: <4512F5E4.9060600@logix-tt.com> Hi, I just stumbled about the readBytes() / writeBytes() methods from SQLInputFromChunk / SQLOutputFromChunk classes. They seem to assume that every array has a 2-byte length header. Where does this assumption come from? Are there some internal data types that use this format? I ask because I'm currently writing a pljava interface for the PostGIS datatypes, and my hope was that readBytes() just reads the whole (variable-length) datatype into the byte array. Another issue is the endianness. For double, I assume that, at least on IEEE floating point platforms, the layout is endian free. But readInt() etc. seem to use big endian regardless of the underlying platform. So it seems that I have to use readByte() and put everything together in the right order on myself, right? Btw, is does the stream include the 4-byte length header for variable length datatypes? The examples seem to cover only fixed-size types. Thanks, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in Europe! www.ffii.org www.nosoftwarepatents.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: