private long incrementPositionAddr(long value) { positionAddr(positionAddr() + value); return positionAddr(); }
public void alignPositionAddr(int powerOf2) { long value = (positionAddr + powerOf2 - 1) & ~(powerOf2 - 1); positionAddr(value); }
void addPosition(long delta) { positionAddr(positionAddr() + delta); }
public void alignPositionAddr(int powerOf2) { long value = (positionAddr + powerOf2 - 1) & ~(powerOf2 - 1); positionAddr(value); }
private long incrementPositionAddr(long value) { positionAddr(positionAddr() + value); return positionAddr(); }
void addPosition(long delta) { positionAddr(positionAddr() + delta); }
@Override public NativeBytes position(long position) { if (position < 0 || position > limit()) throw new IndexOutOfBoundsException("position: " + position + " limit: " + limit()); positionAddr(startAddr + position); return this; }
@Override public NativeBytes position(long position) { if (position < 0 || position > limit()) throw new IndexOutOfBoundsException("position: " + position + " limit: " + limit()); positionAddr(startAddr + position); return this; }
/** * Change the position acknowleging there is no thread safety assumptions. Best effort setting * is fine. * * * @param position to set if we can. * @return this */ public NativeBytes lazyPosition(long position) { if (position < 0 || position > limit()) throw new IndexOutOfBoundsException("position: " + position + " limit: " + limit()); // assume we don't need to no check thread safety. positionAddr(startAddr + position); return this; }
/** * Change the position acknowleging there is no thread safety assumptions. Best effort setting * is fine. * * * @param position to set if we can. * @return this */ public NativeBytes lazyPosition(long position) { if (position < 0 || position > limit()) throw new IndexOutOfBoundsException("position: " + position + " limit: " + limit()); // assume we don't need to no check thread safety. positionAddr(startAddr + position); return this; }