Bruce Momjian <[EMAIL PROTECTED]> writes:
> ! int ret = (buffer[bpos] & 0x7F);
> ! if ((buffer[bpos] &0x80) == 0x80) {
> ! ret |= 0x80;
> ! }
That seems like an awfully ugly (and slow) way of doing unsigned
promotion.
If Java doesn't have a notion of unsigned chars, perhaps this would do:
return ((int) buffer[bpos++]) & 0xFF;
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
- [JDBC] Displaying/Pulling Images using JDBC ... The Hermit Hacker
- Re: [JDBC] Displaying/Pulling Images using JDBC ... Tom Lane
- Re: [JDBC] Displaying/Pulling Images using JDBC ... The Hermit Hacker
- RE: [JDBC] Displaying/Pulling Images using JDBC ... Ho, Khanh
- Tom Lane
