Re: ByteBuffer in java.nio.* - can I really use it?
Monday, July 15, 2002 08:04 PM
How about for the methods that declared as absctract, such as pubInt(), putDouble(), putLong()? can I use them directly?
The funny thing is that I wrote a testing program, and tried to use these methods, and they seem to work fine even though they are abstract methods. And, i unzipped the java source file that came with jdk1.4, and when i look into the ByteBuffer.java code, these classes are real abstract classes, and are not implemented in the source...
This is weired, and I don't know whether I should use this class or not. Anyone can help?
Also, anyone knows the best way of getting the four individual bytes out of an integer (and other primitive types such as double, long, etc?)