public IndexInput slice(String sliceDescription, long offset, long length) throws IOException { return new SlicedBufferIndexInput(sliceDescription, buffer, offset + this.offset, length); }
protected SlicedBufferIndexInput(String resourceDescription, byte[] buffer, long offset, long length) { super(resourceDescription); this.buffer = buffer; this.offset = toInt(offset); this.length = toInt(length); this.hardLimit = this.offset + this.length; this.bufferPosition = this.offset; if (hardLimit > buffer.length) { throw new IllegalArgumentException("offset or length too large for the size of this buffer"); } }
protected SlicedBufferIndexInput(String resourceDescription, byte[] buffer, long offset, long length) { super(resourceDescription); this.buffer = buffer; this.offset = toInt(offset); this.length = toInt(length); this.hardLimit = this.offset + this.length; this.bufferPosition = this.offset; if (hardLimit > buffer.length) { throw new IllegalArgumentException("offset or length too large for the size of this buffer"); } }
public IndexInput slice(String sliceDescription, long offset, long length) throws IOException { return new SlicedBufferIndexInput(sliceDescription, buffer, offset, length); }
public IndexInput slice(String sliceDescription, long offset, long length) throws IOException { return new SlicedBufferIndexInput(sliceDescription, buffer, offset, length); }
public IndexInput slice(String sliceDescription, long offset, long length) throws IOException { return new SlicedBufferIndexInput(sliceDescription, buffer, offset + this.offset, length); }