capacity
Fetches and returns the capacity of the memory region referenced by the given direct java.nio.Buffer. The capacity is the number of elements that the memory region contains.
Receiver
a direct java.nio.Buffer object.
Return
the capacity of the memory region associated with the buffer. Returns -1 if the given object is not a direct java.nio.Buffer, if the object is an unaligned view buffer and the processor architecture does not support unaligned access or if this virtual machine does not support JNI access to direct buffers.
Since
JDK/JRE 1.4