

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
29 messages in net.java.dev.jna.usersRe: [jna-users] Unsigned types| From | Sent On | Attachments |
|---|---|---|
| Wolfgang Pichler | Mar 25, 2009 5:58 am | |
| Timothy Wall | Mar 25, 2009 7:02 am | |
| Timothy Wall | Mar 25, 2009 7:06 am | |
| Wolfgang Pichler | Mar 25, 2009 7:21 am | |
| Timothy Wall | Mar 25, 2009 7:24 am | |
| Wolfgang Pichler | Mar 25, 2009 8:11 am | |
| Wolfgang Pichler | Mar 25, 2009 8:20 am | |
| Novatchkov Hristo | Mar 25, 2009 8:41 am | |
| Timothy Wall | Mar 25, 2009 9:59 am | |
| Timothy Wall | Mar 25, 2009 10:28 am | |
| Timothy Wall | Mar 25, 2009 10:38 am | |
| Hristo Novatchkov | Mar 25, 2009 11:40 am | |
| Wolfgang Pichler | Mar 25, 2009 12:02 pm | |
| LYou...@gkservices.com | Mar 25, 2009 12:11 pm | |
| Timothy Wall | Mar 25, 2009 12:52 pm | |
| Wolfgang Pichler | Mar 26, 2009 12:22 am | |
| Timothy Wall | Mar 26, 2009 4:46 am | |
| Wolfgang Pichler | Mar 26, 2009 5:23 am | |
| Timothy Wall | Mar 26, 2009 6:09 am | |
| Wolfgang Pichler | Mar 26, 2009 6:13 am | |
| Wolfgang Pichler | Mar 26, 2009 6:26 am | |
| Timothy Wall | Mar 26, 2009 6:40 am | |
| Wolfgang Pichler | Mar 26, 2009 12:22 pm | |
| Timothy Wall | Mar 26, 2009 1:00 pm | |
| Wolfgang Pichler | Mar 26, 2009 3:15 pm | |
| Timothy Wall | Mar 30, 2009 6:06 am | |
| Wolfgang Pichler | Mar 30, 2009 11:55 am | |
| Timothy Wall | Mar 30, 2009 12:14 pm | |
| Wolfgang Pichler | Mar 31, 2009 12:35 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [jna-users] Unsigned types | Actions... |
|---|---|---|
| From: | Timothy Wall (twal...@dev.java.net) | |
| Date: | Mar 25, 2009 10:38:54 am | |
| List: | net.java.dev.jna.users | |
On Mar 25, 2009, at 11:41 AM, Novatchkov Hristo wrote:
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)?
Well, unless you explain the way you *would* like it to work, I can't help. Java doesn't do unsigned arithmetic (at least not explicitly), but eight bits of storage doesn't know whether it's signed or unsigned until you put it into a context and use it.







