Allocation.ByteBuffer Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or creates a ByteBuffer that contains the raw data of the current Allocation.
public virtual Java.Nio.ByteBuffer? ByteBuffer { [Android.Runtime.Register("getByteBuffer", "()Ljava/nio/ByteBuffer;", "GetGetByteBufferHandler", ApiSince=24)] get; }
[<get: Android.Runtime.Register("getByteBuffer", "()Ljava/nio/ByteBuffer;", "GetGetByteBufferHandler", ApiSince=24)>]
member this.ByteBuffer : Java.Nio.ByteBuffer
Property Value
ByteBuffer The ByteBuffer associated with raw data pointer of the Allocation.
- Attributes
Remarks
Gets or creates a ByteBuffer that contains the raw data of the current Allocation.
If the Allocation is created with USAGE_IO_INPUT, the returned ByteBuffer would contain the up-to-date data as READ ONLY. For a 2D or 3D Allocation, the raw data maybe padded so that each row of the Allocation has certain alignment. The size of each row including padding, called stride, can be queried using the #getStride()
method.
Note: Operating on the ByteBuffer of a destroyed Allocation will triger errors.
Java documentation for android.renderscript.Allocation.getByteBuffer()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.