@Override public boolean tombstone( BolBuffer rawEntrys) { return rawEntrys.get(keyLength + 8) != 0; }
@Override public long readLong() throws IOException { long l = buf.getLong(offset); offset += 8; return l; }
public static long[] bytesLongs(byte[] _bytes) { if (_bytes == null || _bytes.length == 0) { return null; } int longsCount = _bytes.length / 8; long[] longs = new long[longsCount]; for (int i = 0; i < longsCount; i++) { longs[i] = bytesLong(_bytes, i * 8); } return longs; }
public static int compare(byte[] left, int leftOffset, int leftLength, byte[] right, int rightOffset, int rightLength) { if (theUnsafe != null) { return compareNative(left, leftOffset, leftLength, right, rightOffset, rightLength); } else { return comparePure(left, leftOffset, leftLength, right, rightOffset, rightLength); } }
@Override public short readShort() throws IOException { short s = buf.getShort(offset); offset += 2; return s; }
public static int writeFixedWidthByteArray(byte[] bytes, byte[] destination, int offset) { int o = offset; UIO.writeBytes(bytes, destination, o); o += bytes.length; return o; }
@Override public char readChar() throws IOException { char c = buf.getChar(offset); offset += 2; return c; }
@Override public float readFloat() throws IOException { float f = buf.getFloat(offset); offset += 4; return f; }
@Override public double readDouble() throws IOException { double d = buf.getDouble(offset); offset += 8; return d; }
@Override public BolBuffer key( BolBuffer rawEntry, BolBuffer keyBuffer) { rawEntry.sliceInto(0, keyLength, keyBuffer); return keyBuffer; }
@Override public boolean readBoolean() throws IOException { int ch = buf.get(offset) & 0xFF; offset++; return (ch != 0); }
@Override public long version( BolBuffer rawEntrys) { return rawEntrys.getLong(keyLength + 8 + 1); }
@Override public int readUnsignedShort() throws IOException { int i = buf.getShort(offset) & 0xFFFF; offset += 2; return i; }
@Override public byte readByte() throws IOException { byte b = buf.get(offset); offset++; return b; }
@Override public void readFully(byte[] b, int off, int len) throws IOException { buf.get(offset, b, off, len); offset += len; }
@Override public int readUnsignedByte() throws IOException { int b = buf.get(offset) & 0xFF; offset++; return b; }