@Override
 public IntIndexOutput createOutput(Directory dir, String fileName, IOContext context)
     throws IOException {
   final IntStreamFactory f =
       delegates.get((Math.abs(salt ^ getExtension(fileName).hashCode())) % delegates.size());
   if (LuceneTestCase.VERBOSE) {
     System.out.println(
         "MockRandomCodec: write using int factory " + f + " to fileName=" + fileName);
   }
   return f.createOutput(dir, fileName, context);
 }
 @Override
 public IntIndexInput openInput(Directory dir, String fileName, IOContext context)
     throws IOException {
   // Must only use extension, because IW.addIndexes can
   // rename segment!
   final IntStreamFactory f =
       delegates.get((Math.abs(salt ^ getExtension(fileName).hashCode())) % delegates.size());
   if (LuceneTestCase.VERBOSE) {
     System.out.println(
         "MockRandomCodec: read using int factory " + f + " from fileName=" + fileName);
   }
   return f.openInput(dir, fileName, context);
 }