29 messages in net.java.dev.jna.users[jna-users] Unsigned types
FromSent OnAttachments
Wolfgang PichlerMar 25, 2009 5:58 am 
Timothy WallMar 25, 2009 7:02 am 
Timothy WallMar 25, 2009 7:06 am 
Wolfgang PichlerMar 25, 2009 7:21 am 
Timothy WallMar 25, 2009 7:24 am 
Wolfgang PichlerMar 25, 2009 8:11 am 
Wolfgang PichlerMar 25, 2009 8:20 am 
Novatchkov HristoMar 25, 2009 8:41 am 
Timothy WallMar 25, 2009 9:59 am 
Timothy WallMar 25, 2009 10:28 am 
Timothy WallMar 25, 2009 10:38 am 
Hristo NovatchkovMar 25, 2009 11:40 am 
Wolfgang PichlerMar 25, 2009 12:02 pm 
LYou...@gkservices.comMar 25, 2009 12:11 pm 
Timothy WallMar 25, 2009 12:52 pm 
Wolfgang PichlerMar 26, 2009 12:22 am 
Timothy WallMar 26, 2009 4:46 am 
Wolfgang PichlerMar 26, 2009 5:23 am 
Timothy WallMar 26, 2009 6:09 am 
Wolfgang PichlerMar 26, 2009 6:13 am 
Wolfgang PichlerMar 26, 2009 6:26 am 
Timothy WallMar 26, 2009 6:40 am 
Wolfgang PichlerMar 26, 2009 12:22 pm 
Timothy WallMar 26, 2009 1:00 pm 
Wolfgang PichlerMar 26, 2009 3:15 pm 
Timothy WallMar 30, 2009 6:06 am 
Wolfgang PichlerMar 30, 2009 11:55 am 
Timothy WallMar 30, 2009 12:14 pm 
Wolfgang PichlerMar 31, 2009 12:35 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] Unsigned typesActions...
From:Novatchkov Hristo (hris@univie.ac.at)
Date:Mar 25, 2009 8:41:10 am
List:net.java.dev.jna.users

I'm quite unsure about the use of unsigned types in Java since they are not really supported. For example I want to represent the following C variable definition in Java:

//C definition UCHAR ucData[] = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, 0x00};

//Java definition byte [] key = {(byte) 0xB9, (byte) 0xA5, (byte) 0x21, (byte) 0xFB, (byte) 0xBD, (byte) 0x72, (byte) 0xC3, (byte) 0x45};

Though, that definition won't work like I would like to. I'm afraid that this is due to the signed and not unsigned definition of the type byte. What would be the best way to define unsigned types in Java, so that one can use the full range (0-255)?