@Override public int readInt(long offset) { return getChronicleUnsafe().getInt(start + offset); }
@Override public int readInt(long offset) { return getChronicleUnsafe().getInt(start + offset); }
@Override public int readInt() { int i = getChronicleUnsafe().getInt(position); addPosition(4); return i; }
@Override public int readInt() { int i = getChronicleUnsafe().getInt(position); addPosition(4); return i; }
@Override public boolean compare(long offset, RandomDataInput input, long inputOffset, long len) { if (offset < 0 || inputOffset < 0 || len < 0) throw new IndexOutOfBoundsException(); if (offset + len < 0 || offset + len > capacity() || inputOffset + len < 0 || inputOffset + len > input.capacity()) { return false; } long i = 0L; ChronicleUnsafe unsafe = getChronicleUnsafe(); for (; i < len - 7L; i += 8L) { if (unsafe.getLong(start + offset + i) != input.readLong(inputOffset + i)) return false; } if (i < len - 3L) { if (unsafe.getInt(start + offset + i) != input.readInt(inputOffset + i)) return false; i += 4L; } if (i < len - 1L) { if (unsafe.getChar(start + offset + i) != input.readChar(inputOffset + i)) return false; i += 2L; } if (i < len) { if (unsafe.getByte(start + offset + i) != input.readByte(inputOffset + i)) return false; } return true; }
@Override public boolean compare(long offset, RandomDataInput input, long inputOffset, long len) { if (offset < 0 || inputOffset < 0 || len < 0) throw new IndexOutOfBoundsException(); if (offset + len < 0 || offset + len > capacity() || inputOffset + len < 0 || inputOffset + len > input.capacity()) { return false; } long i = 0L; ChronicleUnsafe unsafe = getChronicleUnsafe(); for (; i < len - 7L; i += 8L) { if (unsafe.getLong(start + offset + i) != input.readLong(inputOffset + i)) return false; } if (i < len - 3L) { if (unsafe.getInt(start + offset + i) != input.readInt(inputOffset + i)) return false; i += 4L; } if (i < len - 1L) { if (unsafe.getChar(start + offset + i) != input.readChar(inputOffset + i)) return false; i += 2L; } if (i < len) { if (unsafe.getByte(start + offset + i) != input.readByte(inputOffset + i)) return false; } return true; }