> Howdy!
> I'm trying to construct an UDP datagram packet with an array of values. Two
[quoted text clipped - 6 lines]
> Thanks,
> mas
Use negative byte values. Or use type-casts, for example:
(byte) 0xC1
Remember: the Java 'byte' is signed, in the range from -128 to +127.

Signature
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')
mswope - 20 Apr 2005 20:16 GMT
>> Howdy!
>> I'm trying to construct an UDP datagram packet with an array of values.
[quoted text clipped - 10 lines]
> (byte) 0xC1
> Remember: the Java 'byte' is signed, in the range from -128 to +127.
Thomas,
I do remember that 'byte' is signed, thus my question. I used type-casting
per each affected element of the array and
it worked.
Thank you!
mas
Boudewijn Dijkstra - 20 Apr 2005 22:35 GMT
>>> Howdy!
>>> I'm trying to construct an UDP datagram packet with an array of values.
[quoted text clipped - 15 lines]
> per each affected element of the array and
> it worked.
Signed or unsigned, it will preserve values in any 256-sized range, including
0..255 and -128..127.
Well, as long as you remember which range it is. ;)