aspose file tools*
The moose likes Beginning Java and the fly likes Integer & Integer32 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Integer & Integer32" Watch "Integer & Integer32" New topic
Author

Integer & Integer32

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
Hello,
what is difference between Integer & Integer32? And also How to convert BITS to Integer32?
Thanks,
Angela
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Which Integer32 are you refering to?
Bsically an 'Integer' is one of the Java wrappers for the primitive types (included in java.lang with Double, Boolean etc)
Integer32 is not, it's built and provided by someone else.
Dave
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Oops, I meant to say "Like this one"
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
That Integer32 is a mutable wrapper class for an integer value, whereas java.lang.Integer is not mutable. The value contained in Integer32 can be changed after it is created. The value in Integer cannot be change after it is created. The latter is safer, in that if two classes hold a reference to an Integer object, there is no way that one of the classes can change the value it represents and confuse the other.
Another unusual thing about this Integer32 is that it has a BER encoding method, which they must be using when they generate SNMP protocol data units. Indeed, this seems to be one of the major goals of the Integer32 class. We cannot see all the features of Integer32 because the link to the documentation for the class it extends is not visible.
(BER is a tagged, varying-length data representation designed for data communications. However, when communicating between Java apps, you would likely use Java serialization instead.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Integer & Integer32