Anybody knows if Javolution support unsigned64 or not? I cannot find similar type defined in its API. My co-worker start use Javolution hoping it will help us to mapping Java types with C++ types in our socket communication. I don't know is there any better solution for this type of conversions.
Asked
Active
Viewed 431 times
1
-
From javolutions homepage: "Javolution is a pure Java Solution (no native code)" - so I don't see how they'd be able to provide additional primitive types. Edit: A quick look in their Struct API also shows no Unsigned64 member so they don't see to support it (although since their struct is wrapper for a ByteBuffer it should be doable) – Voo Jun 03 '11 at 19:34
-
There may be an internal limitation to do with primitive types... I note that they have a `Signed64` which would correspond to a `long`, but no unsigned equivalent. – Lawrence Dol Jun 03 '11 at 19:54
1 Answers
2
For the most part you can treat a long
as unsigned with minor changes. For network communication, its usually simple. However in some cases you need to use BigInteger to store/calculate the value accurately.
I have created a one class library which shows you wys to treat a long
as Unsigned

Peter Lawrey
- 525,659
- 79
- 751
- 1,130
-
1+1 for [`UnsignedTest`](http://code.google.com/p/java-unsigned/source/browse/trunk/unsigned/src/test/java/com/google/code/unsigned/UnsignedTest.java). – trashgod Jun 03 '11 at 20:17