Interface BufferAccess<A>
- All Superinterfaces:
ArrayDataAccess<A>, DataAccess, Serializable, VolatileAccess
- All Known Implementing Classes:
AbstractBufferAccess, ByteBufferAccess, CharBufferAccess, DoubleBufferAccess, FloatBufferAccess, IntBufferAccess, LongBufferAccess, ShortBufferAccess
BufferAccess wraps java.nio.Buffer subclasses and implements
ArrayDataAccess and VolatileAccess.
Subclasses should be able to be constructed from either a specific buffer
(e.g. LongBuffer) or ByteBuffer.-
Method Summary
Modifier and TypeMethodDescriptionintGet number of bytes for one entity in thisBufferAccess.booleanisDirect()Determine if the underlying Buffer is allocated direct (outside of the JVM).booleanDetermine if data can be read only and not writtennewInstance(ByteBuffer buffer, boolean isValid) Create a new instance from a ByteBufferMethods inherited from interface ArrayDataAccess
createArray, getArrayLength, getCurrentStorageArrayMethods inherited from interface DataAccess
createViewMethods inherited from interface VolatileAccess
isValid
-
Method Details
-
isDirect
boolean isDirect()Determine if the underlying Buffer is allocated direct (outside of the JVM).- Returns:
- true if the Buffer is direct.
- See Also:
-
isReadOnly
boolean isReadOnly()Determine if data can be read only and not written- Returns:
- See Also:
-
getNumBytesPerEntity
int getNumBytesPerEntity()Get number of bytes for one entity in thisBufferAccess. This usually retrieves a static field.- Returns:
- number of bytes
-
newInstance
Create a new instance from a ByteBuffer- Parameters:
buffer-isValid-- Returns:
-