Index: src/java/org/apache/lucene/index/codecs/intblock/SimpleIntBlockIndexOutput.java
===================================================================
--- src/java/org/apache/lucene/index/codecs/intblock/SimpleIntBlockIndexOutput.java	(revision 925935)
+++ src/java/org/apache/lucene/index/codecs/intblock/SimpleIntBlockIndexOutput.java	(working copy)
@@ -21,11 +21,11 @@
  *  expected to give poor performance; it's really only for
  *  testing the pluggability.  One should typically use pfor instead. */
 
-import org.apache.lucene.util.CodecUtil;
+import java.io.IOException;
+
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.IndexOutput;
-
-import java.io.IOException;
+import org.apache.lucene.util.CodecUtil;
 
 /**
  * Don't use this class!!  It naively encodes ints one vInt
@@ -39,16 +39,22 @@
   public final static int VERSION_START = 0;
   public final static int VERSION_CURRENT = VERSION_START;
 
-  public SimpleIntBlockIndexOutput(Directory dir, String fileName, int blockSize) throws IOException {
-    IndexOutput out = dir.createOutput(fileName);
+  public SimpleIntBlockIndexOutput(final Directory dir, final String fileName, final int blockSize) throws IOException {
+    final IndexOutput out = dir.createOutput(fileName);
     CodecUtil.writeHeader(out, CODEC, VERSION_CURRENT);
-    init(out, blockSize);
+    this.init(out, blockSize);
+  }
+
+  @Override
+  protected void flushBlock(final int[] buffer, final IndexOutput out) throws IOException {
+    this.flushBlock(buffer, buffer.length, out);
   }
 
   @Override
-  protected void flushBlock(int[] buffer, IndexOutput out) throws IOException {
+  protected void flushBlock(final int[] buffer, final int length, final IndexOutput out)
+  throws IOException {
     // silly impl
-    for(int i=0;i<buffer.length;i++) {
+    for(int i = 0; i < length; i++) {
       out.writeVInt(buffer[i]);
     }
   }
Index: src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java
===================================================================
--- src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java	(revision 925935)
+++ src/java/org/apache/lucene/index/codecs/intblock/FixedIntBlockIndexOutput.java	(working copy)
@@ -41,7 +41,7 @@
   private int[] pending;
   private int upto;
 
-  protected void init(IndexOutput out, int fixedBlockSize) throws IOException {
+  protected void init(final IndexOutput out, final int fixedBlockSize) throws IOException {
     blockSize = fixedBlockSize;
     out.writeVInt(blockSize);
     this.out = out;
@@ -50,6 +50,8 @@
 
   protected abstract void flushBlock(int[] buffer, IndexOutput out) throws IOException;
 
+  protected abstract void flushBlock(int[] buffer, int length, IndexOutput out) throws IOException;
+
   @Override
   public Index index() throws IOException {
     return new Index();
@@ -73,14 +75,14 @@
     }
 
     @Override
-    public void set(IntIndexOutput.Index other) throws IOException {
-      Index idx = (Index) other;
+    public void set(final IntIndexOutput.Index other) throws IOException {
+      final Index idx = (Index) other;
       lastFP = fp = idx.fp;
       lastUpto = upto = idx.upto;
     }
 
     @Override
-    public void write(IndexOutput indexOut, boolean absolute) throws IOException {
+    public void write(final IndexOutput indexOut, final boolean absolute) throws IOException {
       if (absolute) {
         indexOut.writeVLong(fp);
         indexOut.writeVInt(upto);
@@ -89,7 +91,7 @@
         indexOut.writeVLong(0);
         assert upto >= lastUpto;
         indexOut.writeVLong(upto - lastUpto);
-      } else {      
+      } else {
         // new block
         indexOut.writeVLong(fp - lastFP);
         indexOut.writeVLong(upto);
@@ -100,10 +102,10 @@
   }
 
   @Override
-  public void write(int v) throws IOException {
+  public void write(final int v) throws IOException {
     pending[upto++] = v;
     if (upto == blockSize) {
-      flushBlock(pending, out);
+      this.flushBlock(pending, out);
       upto = 0;
     }
   }
@@ -114,7 +116,7 @@
       if (upto > 0) {
       // NOTE: entries in the block after current upto are
       // invalid
-        flushBlock(pending, out);
+        this.flushBlock(pending, upto, out);
       }
     } finally {
       out.close();

