/** Subclasses call this to get the String for resourceDescription of a slice of this {@code IndexInput}. */ protected String getFullSliceDescription(String sliceDescription) { if (sliceDescription == null) { // Clones pass null sliceDescription: return toString(); } else { return toString() + " [slice=" + sliceDescription + "]"; } }
@Override public String toString() { return "RandomAccessInput(" + IndexInput.this.toString() + ")"; } };
SlicedIndexInput(String sliceDescription, IndexInput base, long offset, long length) { super((sliceDescription == null) ? base.toString() : (base.toString() + " [slice=" + sliceDescription + "]"), BufferedIndexInput.BUFFER_SIZE); if (offset < 0 || length < 0 || offset + length > base.length()) { throw new IllegalArgumentException("slice() " + sliceDescription + " out of bounds: " + base); } this.base = base.clone(); this.fileOffset = offset; this.length = length; }
copies.set(true); final IndexInput input = in.openInput(name, context); return new IndexInput("StatsDirectoryWrapper(" + input.toString() + ")") { @Override public void close() throws IOException {
@Override public String toString() { return "RandomAccessInput(" + IndexInput.this.toString() + ")"; } };
/** Subclasses call this to get the String for resourceDescription of a slice of this {@code IndexInput}. */ protected String getFullSliceDescription(String sliceDescription) { if (sliceDescription == null) { // Clones pass null sliceDescription: return toString(); } else { return toString() + " [slice=" + sliceDescription + "]"; } }
/** Subclasses call this to get the String for resourceDescription of a slice of this {@code IndexInput}. */ protected String getFullSliceDescription(String sliceDescription) { if (sliceDescription == null) { // Clones pass null sliceDescription: return toString(); } else { return toString() + " [slice=" + sliceDescription + "]"; } }
/** Subclasses call this to get the String for resourceDescription of a slice of this {@code IndexInput}. */ protected String getFullSliceDescription(String sliceDescription) { if (sliceDescription == null) { // Clones pass null sliceDescription: return toString(); } else { return toString() + " [slice=" + sliceDescription + "]"; } }
@Override public String toString() { return "IndexInputDelegate to " + delegate.toString(); }
public IndexInputDelegate(IndexInput delegate) { super( delegate.toString() ); this.delegate = delegate; }
SlicedIndexInput(String sliceDescription, IndexInput base, long offset, long length) { super((sliceDescription == null) ? base.toString() : (base.toString() + " [slice=" + sliceDescription + "]"), BufferedIndexInput.BUFFER_SIZE); if (offset < 0 || length < 0 || offset + length > base.length()) { throw new IllegalArgumentException("slice() " + sliceDescription + " out of bounds: " + base); } this.base = base.clone(); this.fileOffset = offset; this.length = length; }
SlicedIndexInput(String sliceDescription, IndexInput base, long offset, long length) { super((sliceDescription == null) ? base.toString() : (base.toString() + " [slice=" + sliceDescription + "]"), BufferedIndexInput.BUFFER_SIZE); if (offset < 0 || length < 0 || offset + length > base.length()) { throw new IllegalArgumentException("slice() " + sliceDescription + " out of bounds: " + base); } this.base = base.clone(); this.fileOffset = offset; this.length = length; }
SlicedIndexInput(String sliceDescription, IndexInput base, long offset, long length) { super((sliceDescription == null) ? base.toString() : (base.toString() + " [slice=" + sliceDescription + "]"), BufferedIndexInput.BUFFER_SIZE); if (offset < 0 || length < 0 || offset + length > base.length()) { throw new IllegalArgumentException("slice() " + sliceDescription + " out of bounds: " + base); } this.base = base.clone(); this.fileOffset = offset; this.length = length; }
copies.set(true); final IndexInput input = in.openInput(name, context); return new IndexInput("StatsDirectoryWrapper(" + input.toString() + ")") { @Override public void close() throws IOException {
copies.set(true); final IndexInput input = in.openInput(name, context); return new IndexInput("StatsDirectoryWrapper(" + input.toString() + ")") { @Override public void close() throws IOException {
copies.set(true); final IndexInput input = in.openInput(name, context); return new IndexInput("StatsDirectoryWrapper(" + input.toString() + ")") { @Override public void close() throws IOException {
public CompressedIndexInput(IndexInput in) throws IOException { super("compressed(" + in.toString() + ")"); this.in = in; readHeader(in); this.version = in.readInt(); long metaDataPosition = in.readLong(); long headerLength = in.getFilePointer(); in.seek(metaDataPosition); this.totalUncompressedLength = in.readVLong(); int size = in.readVInt(); offsets = BigArrays.NON_RECYCLING_INSTANCE.newLongArray(size); for (int i = 0; i < size; i++) { offsets.set(i, in.readVLong()); } this.currentOffsetIdx = -1; this.currentUncompressedChunkPointer = 0; in.seek(headerLength); }