mirror of
https://github.com/corda/corda.git
synced 2025-01-22 04:18:31 +00:00
ByteBuffer: add missing order() methods
Avian's ByteBuffer implementation is actually fixed to big endian. So let's throw an exception if the user tries to change that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
320fc511dc
commit
4f83f8dd98
@ -244,4 +244,13 @@ public abstract class ByteBuffer
|
||||
protected void checkGet(int position, int amount) {
|
||||
if (amount > limit-position) throw new IndexOutOfBoundsException();
|
||||
}
|
||||
|
||||
public ByteBuffer order(ByteOrder order) {
|
||||
if (order != ByteOrder.BIG_ENDIAN) throw new UnsupportedOperationException();
|
||||
return this;
|
||||
}
|
||||
|
||||
public ByteOrder order() {
|
||||
return ByteOrder.BIG_ENDIAN;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user