DirectByteBuffer constructor

DirectByteBuffer(
  1. Pointer<Void> bytes,
  2. int lengthInBytes
)

Implementation

DirectByteBuffer(this.bytes, this.lengthInBytes) {
  if (bytes == nullptr || lengthInBytes == 0) {
    _ptr = nullptr;
    return;
  }
  _ptr = _newDirectByteBuffer(bytes, lengthInBytes);
  bindLifeCycleWithJava(_ptr);
}