Get the content length of the given record in bytes, not 16 bit words.

@param index
The index, from 0 to getRecordCount - 1
@return The lengh in bytes of the record.
@throws java.io.IOException
4729
public int getContentLength(int index) throws IOException {
		int ret = -1;

		if (this.lastIndex != index) {
			this.readRecord(index);
		}

		ret = this.recLen;

		return ret;
	}
41779
public static long getLong(final DirectBuffer buffer, final int index, final Encoding encoding)
    {
        switch (encoding.primitiveType())
        {
            case CHAR:
                return buffer.getByte(index);

            case INT8:
                return buffer.getByte(index);

            case INT16:
                return buffer.getShort(index, encoding.byteOrder());

            case INT32:
                return buffer.getInt(index, encoding.byteOrder());

            case INT64:
                return buffer.getLong(index, encoding.byteOrder());

            case UINT8:
                return (short)(buffer.getByte(index) & 0xFF);

            case UINT16:
                return buffer.getShort(index, encoding.byteOrder()) & 0xFFFF;

            case UINT32:
                return buffer.getInt(index, encoding.byteOrder()) & 0xFFFF_FFFFL;

            case UINT64:
                return buffer.getLong(index, encoding.byteOrder());

            default:
                throw new IllegalArgumentException("Unsupported type for long: " + encoding.primitiveType());
        }
    }
937267
public synchronized <T extends Entry> T get(long index) {
    assertSegmentOpen();
    checkRange(index);

    // Get the offset of the index within this segment.
    long offset = relativeOffset(index);

    // Get the start position of the entry from the memory index.
    long position = offsetIndex.position(offset);

    // If the index contained the entry, read the entry from the buffer.
    if (position != -1) {

      // Read the length of the entry.
      int length = buffer.readInt(position);

      // Read the entry into memory.
      try (Buffer slice = buffer.slice(position + INTEGER, length)) {
        slice.read(memory.clear().limit(length));
        memory.flip();
      }

      // Read the checksum of the entry.
      long checksum = memory.readUnsignedInt();

      // Verify that the entry at the given offset matches.
      long entryOffset = memory.readLong();
      Assert.state(entryOffset == offset, "inconsistent index: %s", index);

      // Skip the term if necessary.
      if (memory.readBoolean()) {
        memory.skip(LONG);
      }

      // Calculate the entry position and length.
      int entryPosition = (int) memory.position();
      int entryLength = length - entryPosition;

      // Compute the checksum for the entry bytes.
      Checksum crc32 = new CRC32();
      crc32.update(memory.array(), entryPosition, entryLength);

      // If the stored checksum equals the computed checksum, return the entry.
      if (checksum == crc32.getValue()) {
        T entry = serializer.readObject(memory);
        entry.setIndex(index).setTerm(termIndex.lookup(offset)).setSize(length);
        return entry;
      }
    }
    return null;
  }
497058
public int getInt(int index)
    {
        checkPositionIndexes(index, index + SIZE_OF_INT, this.length);
        index += offset;
        return (data[index] & 0xff) |
                (data[index + 1] & 0xff) << 8 |
                (data[index + 2] & 0xff) << 16 |
                (data[index + 3] & 0xff) << 24;
    }
599471
@Override
    public long length()
                    throws IOException {
        int len = physical.size();
        int answer = 0;
        for (int i = 0; i < len; i++) {
            RandomAccessFile raf = (RandomAccessFile) physical.get(i);
            if (raf != null) {
                answer += raf.length();
            }
        }
        return answer;
    }
166223
public ByteBuffer getValue(int index) throws IOException {
        if (index >= structure.valueSizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        int length = structure.valueSizes.get(index);
        return ByteBuffer.wrap(value, structure.valueByteOffsets.get(index), length).asReadOnlyBuffer();
    }
341384
public int parseNaturalIntAscii(final int index, final int length)
    {
        boundsCheck0(index, length);

        final int end = index + length;
        int tally = 0;
        for (int i = index; i < end; i++)
        {
            tally = (tally * 10) + AsciiEncoding.getDigit(i, byteArray[i]);
        }

        return tally;
    }
1336031
private void recordIndex(int index) {
        stateLock.writeLock().lock();
        try {
            int insertionPoint = -Arrays.binarySearch(effectiveIndex, index) - 1;
            System.arraycopy(effectiveIndex, insertionPoint, effectiveIndex, insertionPoint + 1, effectiveIndex.length - insertionPoint - 1);
            effectiveIndex[insertionPoint] = index;
        } finally {
            stateLock.writeLock().unlock();
        }
    }
11232
public boolean get(long index) {
    if (!(index < size))
      throw new IndexOutOfBoundsException();
    return (bytes.readLong(offset(index)) & (1l << (position(index)))) != 0;
  }
882792
@Override
    public short getShort(final int index) {
        boundsCheck(index, Bits.SHORT_SIZE_IN_BYTES);

        short bits = MEM.getShort(byteArray, addressOffset + index);
        if (NATIVE_BYTE_ORDER != PROTOCOL_BYTE_ORDER) {
            bits = Short.reverseBytes(bits);
        }

        return bits;
    }
282506
public byte get(int index) throws IndexOutOfBoundsException {
        if (index >= this.size) {
            throw new IndexOutOfBoundsException("数组大小为：" + this.size + ";下标为：" + index);
        }
        return datas[index];
    }
308979
public Long getLong(int index) {
        Object number = list.get(index);
        if (number == null) return null;
        if (number instanceof Long) return (Long) number;
        if (number instanceof Double) return ((Double) number).longValue();
        throw new JsonException("not a long");
    }
1231130
public JcNumber length() {
		JcNumber ret = new JcNumber(null, this,
				new FunctionInstance(FUNCTION.Collection.LENGTH, 1));
		QueryRecorder.recordInvocationConditional(this, "length", ret);
		return ret;
	}
690507
public int getField(int index)
	{
		assert (index >= 0 && index < version.length);

		if (index >= 0 && index < this.version.length)
		{
			return version[index];
		}
		else
		{
			throw new IllegalArgumentException("The field index requested does not exist in this Version object");
		}
	}
492770
public ByteBuffer get(final int index) {
		if (!validState) {
			throw new InvalidStateException();
		}
		if (log.isDebugEnabled()) {
			log.debug("get(" + index + ")");
		}
		try {
			if (useMmap) {
				final MappedByteBuffer mbb = getMmapForIndex(index);
				if (mbb != null) {
					return mbb;
				}
				// Fallback to RAF
			}
			final ByteBuffer buf = bufstack.pop();
			fileChannel.position(index * blockSize).read(buf);
			buf.rewind();
			return buf;
		} catch (Exception e) {
			log.error("Exception in get(" + index + ")", e);
		}
		return null;
	}
978943
long prevSetBit(long index) {
		assert index >= 0 && index < numBits : "index=" + index + " numBits=" + numBits;
		int i = (int) (index >> 6);
		final int subIndex = (int) (index & 0x3f); // index within the word
		long word = (bits[i] << (63 - subIndex)); // skip all the bits to the
													// left of index

		if (word != 0) {
			return (i << 6) + subIndex - Long.numberOfLeadingZeros(word); // See
																			// LUCENE-3197
		}

		while (--i >= 0) {
			word = bits[i];
			if (word != 0) {
				return (i << 6) + 63 - Long.numberOfLeadingZeros(word);
			}
		}

		return -1;
	}
1342012
@Override
    public Long getLong(int index) {
        indexCheck();
        return rows.get(row).getLong(index);
    }