Closed oneengineer closed 2 years ago
I just checked BytePointer
works well, not sure the purpose of Pointer's Buffer constructor.
It's only going to do something for direct buffers. There's no void[], or VoidBuffer, so there's nothing we can do there. I think the docs are pretty clear: http://bytedeco.org/javacpp/apidocs/org/bytedeco/javacpp/Pointer.html#Pointer-java.nio.Buffer-
If you would like to make it clearer though, please open a pull request with your suggestions. Thanks!
My bad, I don't what direct refer at the first place. The docs are very clear. Thanks!
I want to initialize a pointer with data store in a ByteBuffer. However the pointer seems to be created as size of 1 byte. Here is what I did:
I look up the initializer of the Pointer, it seems the code never goes to
!isNull()
because the address is initialized as 0. So that address/position/capacity won't be set as the buffers'.