Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
doubleGeometryBuffer 是一个包含双精度值的字节数组。
我的问题是如何将 doubleGeometryBuffer 放入 DoubleBuffer?
我尝试了以下建议:
DoubleBuffer dbls = new ByteBuffer(doubleGeometryBuffer).asDoubleBuffer();
但是,这会返回错误“无法实例化类型 ByteBuffer”
尝试这个
DoubleBuffer dbls = ByteBuffer.wrap(doubleGeometryBuffer).asDoubleBuffer();