Interface BufferAccess<A>
-
- All Superinterfaces:
ArrayDataAccess<A>,DataAccess,java.io.Serializable,VolatileAccess
- All Known Implementing Classes:
AbstractBufferAccess,ByteBufferAccess,CharBufferAccess,DoubleBufferAccess,FloatBufferAccess,IntBufferAccess,LongBufferAccess,ShortBufferAccess
public interface BufferAccess<A> extends VolatileAccess, ArrayDataAccess<A>
BufferAccess wraps java.nio.Buffer subclasses and implementsArrayDataAccessandVolatileAccess. Subclasses should be able to be constructed from either a specific buffer (e.g. LongBuffer) orByteBuffer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetNumBytesPerEntity()Get number of bytes for one entity in thisBufferAccess.booleanisDirect()Determine if the underlying Buffer is allocated direct (outside of the JVM).booleanisReadOnly()Determine if data can be read only and not writtenAnewInstance(java.nio.ByteBuffer buffer, boolean isValid)Create a new instance from a ByteBuffer-
Methods inherited from interface net.imglib2.img.basictypeaccess.array.ArrayDataAccess
createArray, getArrayLength, getCurrentStorageArray
-
Methods inherited from interface net.imglib2.img.basictypeaccess.DataAccess
createView
-
Methods inherited from interface net.imglib2.img.basictypeaccess.volatiles.VolatileAccess
isValid
-
-
-
-
Method Detail
-
isDirect
boolean isDirect()
Determine if the underlying Buffer is allocated direct (outside of the JVM).- Returns:
- true if the Buffer is direct.
- See Also:
Buffer.isDirect()
-
isReadOnly
boolean isReadOnly()
Determine if data can be read only and not written- Returns:
- See Also:
Buffer.isReadOnly()
-
getNumBytesPerEntity
int getNumBytesPerEntity()
Get number of bytes for one entity in thisBufferAccess. This usually retrieves a static field.- Returns:
- number of bytes
-
newInstance
A newInstance(java.nio.ByteBuffer buffer, boolean isValid)
Create a new instance from a ByteBuffer- Parameters:
buffer-isValid-- Returns:
-
-