public virtual void TestSimpleIntBlocks() { Directory dir = NewDirectory(); Int32StreamFactory f = (new MockFixedInt32BlockPostingsFormat(128)).GetInt32Factory(); Int32IndexOutput @out = f.CreateOutput(dir, "test", NewIOContext(Random)); for (int i = 0; i < 11777; i++) { @out.Write(i); } @out.Dispose(); Int32IndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random)); Int32IndexInput.Reader r = @in.GetReader(); for (int i = 0; i < 11777; i++) { assertEquals(i, r.Next()); } @in.Dispose(); dir.Dispose(); }
public override void Seek(Int32IndexInput.Reader other) { ((Reader)other).Seek(fp, upto); }