remove dead code

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/pforcodec_3892@1357024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-07-04 00:33:19 +00:00
parent 5b4e1aea06
commit 1616749915
3 changed files with 0 additions and 61 deletions

View File

@ -87,14 +87,12 @@ public abstract class FixedIntBlockIndexInput extends IntIndexInput {
private long lastBlockFP;
private final BlockReader blockReader;
private final int blockSize;
private final IntsRef bulkResult = new IntsRef();
public Reader(final IndexInput in, final int[] pending, final BlockReader blockReader)
throws IOException {
this.in = in;
this.pending = pending;
this.blockSize = pending.length;
bulkResult.ints = pending;
this.blockReader = blockReader;
upto = blockSize;
}
@ -129,25 +127,6 @@ public abstract class FixedIntBlockIndexInput extends IntIndexInput {
return pending[upto++];
}
@Override
public IntsRef read(final int count) throws IOException {
this.maybeSeek();
if (upto == blockSize) {
blockReader.readBlock();
upto = 0;
}
bulkResult.offset = upto;
if (upto + count < blockSize) {
bulkResult.length = count;
upto += count;
} else {
bulkResult.length = blockSize - upto;
upto = blockSize;
}
return bulkResult;
}
}
private class Index extends IntIndexInput.Index {

View File

@ -90,13 +90,11 @@ public abstract class VariableIntBlockIndexInput extends IntIndexInput {
private long lastBlockFP;
private int blockSize;
private final BlockReader blockReader;
private final IntsRef bulkResult = new IntsRef();
public Reader(final IndexInput in, final int[] pending, final BlockReader blockReader)
throws IOException {
this.in = in;
this.pending = pending;
bulkResult.ints = pending;
this.blockReader = blockReader;
}
@ -147,26 +145,6 @@ public abstract class VariableIntBlockIndexInput extends IntIndexInput {
return pending[upto++];
}
@Override
public IntsRef read(final int count) throws IOException {
this.maybeSeek();
if (upto == blockSize) {
lastBlockFP = in.getFilePointer();
blockSize = blockReader.readBlock();
upto = 0;
}
bulkResult.offset = upto;
if (upto + count < blockSize) {
bulkResult.length = count;
upto += count;
} else {
bulkResult.length = blockSize - upto;
upto = blockSize;
}
return bulkResult;
}
}
private class Index extends IntIndexInput.Index {

View File

@ -54,23 +54,5 @@ public abstract class IntIndexInput implements Closeable {
/** Reads next single int */
public abstract int next() throws IOException;
/** Reads next chunk of ints */
private IntsRef bulkResult;
/** Read up to count ints. */
public IntsRef read(int count) throws IOException {
if (bulkResult == null) {
bulkResult = new IntsRef();
bulkResult.ints = new int[count];
} else {
bulkResult.grow(count);
}
for(int i=0;i<count;i++) {
bulkResult.ints[i] = next();
}
bulkResult.length = count;
return bulkResult;
}
}
}