public int size() { return MemoryUtil.getShort(peer); }
public int size() { return MemoryUtil.getShort(peer); }
public int size() { return MemoryUtil.getShort(peer); }
public int size() { return MemoryUtil.getShort(peer); }
protected final int getShort(long offset) { checkPosition(offset, 2); return MemoryUtil.getShort(peer + offset); }
public ByteBuffer get(int i) { // offset at which we store the dataOffset int size = size(); if (i >= size) throw new IndexOutOfBoundsException(); int metadataSize = (size * 2) + 4; int bitmapSize = ((size + 7) >>> 3); long bitmapStart = peer + metadataSize; int b = MemoryUtil.getByte(bitmapStart + (i >>> 3)); if ((b & (1 << (i & 7))) != 0) return null; int startOffset = MemoryUtil.getShort(peer + 2 + i * 2); int endOffset = MemoryUtil.getShort(peer + 4 + i * 2); return MemoryUtil.getByteBuffer(bitmapStart + bitmapSize + startOffset, endOffset - startOffset, ByteOrder.BIG_ENDIAN); }
public ByteBuffer get(int i) { // offset at which we store the dataOffset int size = size(); if (i >= size) throw new IndexOutOfBoundsException(); int metadataSize = (size * 2) + 4; int bitmapSize = ((size + 7) >>> 3); long bitmapStart = peer + metadataSize; int b = MemoryUtil.getByte(bitmapStart + (i >>> 3)); if ((b & (1 << (i & 7))) != 0) return null; int startOffset = MemoryUtil.getShort(peer + 2 + i * 2); int endOffset = MemoryUtil.getShort(peer + 4 + i * 2); return MemoryUtil.getByteBuffer(bitmapStart + bitmapSize + startOffset, endOffset - startOffset, ByteOrder.BIG_ENDIAN); }
public ByteBuffer get(int i) { // offset at which we store the dataOffset int size = size(); if (i >= size) throw new IndexOutOfBoundsException(); int metadataSize = (size * 2) + 4; int bitmapSize = ((size + 7) >>> 3); long bitmapStart = peer + metadataSize; int b = MemoryUtil.getByte(bitmapStart + (i >>> 3)); if ((b & (1 << (i & 7))) != 0) return null; int startOffset = MemoryUtil.getShort(peer + 2 + i * 2); int endOffset = MemoryUtil.getShort(peer + 4 + i * 2); return MemoryUtil.getByteBuffer(bitmapStart + bitmapSize + startOffset, endOffset - startOffset, ByteOrder.BIG_ENDIAN); }
public ByteBuffer get(int i) { // offset at which we store the dataOffset int size = size(); if (i >= size) throw new IndexOutOfBoundsException(); int metadataSize = (size * 2) + 4; int bitmapSize = ((size + 7) >>> 3); long bitmapStart = peer + metadataSize; int b = MemoryUtil.getByte(bitmapStart + (i >>> 3)); if ((b & (1 << (i & 7))) != 0) return null; int startOffset = MemoryUtil.getShort(peer + 2 + i * 2); int endOffset = MemoryUtil.getShort(peer + 4 + i * 2); return MemoryUtil.getByteBuffer(bitmapStart + bitmapSize + startOffset, endOffset - startOffset, ByteOrder.BIG_ENDIAN); }