From: | schabi at logix-tt(dot)com (Markus Schaber) |
---|---|
To: | |
Subject: | [Pljava-dev] readBytes() / writeBytes() |
Date: | 2006-09-21 20:28:20 |
Message-ID: | 4512F5E4.9060600@logix-tt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pljava-dev |
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: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20060921/fb5f2f43/attachment.bin>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2006-09-22 08:17:27 | [Pljava-dev] readBytes() / writeBytes() |
Previous Message | Markus Schaber | 2006-09-21 13:51:36 | [Pljava-dev] Best way to pass intermediate state |