November 28th, 2011, 03:04 PM
|
#2 (permalink)
|
|
Premium Member
Join Date: Oct 2011
Location: Sydney, Australia
Posts: 193
Device(s): Galaxy Nexus GSM
Thanks: 2
Thanked 37 Times in 33 Posts
|
You can't have an actual ByteBuffer object because the ByteBuffer class is abstract. What you'll actually have an object of a concrete subclasss of ByteBuffer. This subclass will have provided the implementation of asFloatBuffer().
Note that asFloatFloat() won't convert the underlying bytes from chars to floats. It will just return an object which will be a concrete subclass of FloatBuffer, and that will simply just start interpreting the remaining, unread bytes in the buffer as floats instead of as chars.
|
|
|