You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An UnsafeBuffer can wrap, or be constructed using an existing ByteBuffer. A ByteBuffer has an ordering (or rather a 'bigEndian' flag) but an UnsafeBuffer does not. This can yield some surprise should a ByteBuffer setup to a particular ordering (via ByteBuffer.ordering(ByteOrder)) be wrapped by an UnsafeBuffer.
UnsafeBuffer currently handles ordering as a JVM wide choice (via the NATIVE_BYTE_ORDER constant). We should either document this discrepancy (I think sprinkling some javadocs would be suffecient) or accommodate ordering choice by buffer.
The text was updated successfully, but these errors were encountered:
UnsafeBuffer does not store state like ByteBuffer. This makes it thread safe. If you wish to set byte ordering other than the native setting then all the accessors have overloads.
An UnsafeBuffer can wrap, or be constructed using an existing ByteBuffer. A ByteBuffer has an ordering (or rather a 'bigEndian' flag) but an UnsafeBuffer does not. This can yield some surprise should a ByteBuffer setup to a particular ordering (via ByteBuffer.ordering(ByteOrder)) be wrapped by an UnsafeBuffer.
UnsafeBuffer currently handles ordering as a JVM wide choice (via the NATIVE_BYTE_ORDER constant). We should either document this discrepancy (I think sprinkling some javadocs would be suffecient) or accommodate ordering choice by buffer.
The text was updated successfully, but these errors were encountered: