lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [04/53] [abbrv] lucenenet git commit: Lucene.Net.Core: Renamed all type-derived properties and methods from Short, Int, Long, and Float to match CLR types Int16, Int32, Int64, and Single, respectively.
Date Wed, 08 Feb 2017 14:31:43 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
index da8ce9d..9770af5 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
@@ -104,8 +104,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                         if (nextArc != null)
                         {
                             IntsRef newInput = new IntsRef(currentInput.Length + 1);
-                            newInput.CopyInts(currentInput);
-                            newInput.Ints[currentInput.Length] = t.Min;
+                            newInput.CopyInt32s(currentInput);
+                            newInput.Int32s[currentInput.Length] = t.Min;
                             newInput.Length = currentInput.Length + 1;
                             queue.Add(new Path<T>(t.Dest, new FST.Arc<T>()
                               .CopyFrom(nextArc), fst.Outputs.Add(path.Output, nextArc.Output), newInput));
@@ -127,8 +127,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                             Debug.Assert(nextArc.Label <= max);
                             Debug.Assert(nextArc.Label >= min, nextArc.Label + " " + min);
                             IntsRef newInput = new IntsRef(currentInput.Length + 1);
-                            newInput.CopyInts(currentInput);
-                            newInput.Ints[currentInput.Length] = nextArc.Label;
+                            newInput.CopyInt32s(currentInput);
+                            newInput.Int32s[currentInput.Length] = nextArc.Label;
                             newInput.Length = currentInput.Length + 1;
                             queue.Add(new Path<T>(t.Dest, new FST.Arc<T>()
                               .CopyFrom(nextArc), fst.Outputs.Add(path.Output, nextArc.Output), newInput));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
index 0a29651..2336710 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
@@ -213,12 +213,12 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 readerB.Reset(b.Bytes, b.Offset, b.Length);
 
                 // By token:
-                scratchA.Length = (ushort)readerA.ReadShort();
+                scratchA.Length = (ushort)readerA.ReadInt16();
                 scratchA.Bytes = a.Bytes;
                 scratchA.Offset = readerA.Position;
 
                 scratchB.Bytes = b.Bytes;
-                scratchB.Length = (ushort)readerB.ReadShort();
+                scratchB.Length = (ushort)readerB.ReadInt16();
                 scratchB.Offset = readerB.Position;
 
                 int cmp = scratchA.CompareTo(scratchB);
@@ -391,7 +391,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                             totTokens += termsEnum.TotalTermFreq;
                         }
 
-                        builder.Add(Lucene.Net.Util.Fst.Util.ToIntsRef(term, scratchInts), EncodeWeight(termsEnum.TotalTermFreq));
+                        builder.Add(Lucene.Net.Util.Fst.Util.ToInt32sRef(term, scratchInts), EncodeWeight(termsEnum.TotalTermFreq));
                     }
 
                     fst = builder.Finish();
@@ -454,10 +454,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public override bool Store(DataOutput output)
         {
             CodecUtil.WriteHeader(output, CODEC_NAME, VERSION_CURRENT);
-            output.WriteVLong(count);
+            output.WriteVInt64(count);
             output.WriteByte(separator);
-            output.WriteVInt(grams);
-            output.WriteVLong(totTokens);
+            output.WriteVInt32(grams);
+            output.WriteVInt64(totTokens);
             fst.Save(output);
             return true;
         }
@@ -465,18 +465,18 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public override bool Load(DataInput input)
         {
             CodecUtil.CheckHeader(input, CODEC_NAME, VERSION_START, VERSION_START);
-            count = input.ReadVLong();
+            count = input.ReadVInt64();
             var separatorOrig = (sbyte)input.ReadByte();
             if (separatorOrig != separator)
             {
                 throw new InvalidOperationException("separator=" + separator + " is incorrect: original model was built with separator=" + separatorOrig);
             }
-            int gramsOrig = input.ReadVInt();
+            int gramsOrig = input.ReadVInt32();
             if (gramsOrig != grams)
             {
                 throw new InvalidOperationException("grams=" + grams + " is incorrect: original model was built with grams=" + gramsOrig);
             }
-            totTokens = input.ReadVLong();
+            totTokens = input.ReadVInt64();
 
             fst = new FST<long?>(input, PositiveIntOutputs.Singleton);
 
@@ -676,7 +676,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                         if (token.Bytes[token.Offset + i] == separator)
                         {
                             BytesRef context = new BytesRef(token.Bytes, token.Offset, i);
-                            long? output = Lucene.Net.Util.Fst.Util.Get(fst, Lucene.Net.Util.Fst.Util.ToIntsRef(context, new IntsRef()));
+                            long? output = Lucene.Net.Util.Fst.Util.Get(fst, Lucene.Net.Util.Fst.Util.ToInt32sRef(context, new IntsRef()));
                             Debug.Assert(output != null);
                             contextCount = DecodeWeight(output);
                             lastTokenFragment = new BytesRef(token.Bytes, token.Offset + i + 1, token.Length - i - 1);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
index 5f202fb..9600293 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
@@ -230,14 +230,14 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             {
                 if (path.Length <= nonFuzzyPrefix || path.Length < minFuzzyLength)
                 {
-                    subs[upto] = BasicAutomata.MakeString(path.Ints, path.Offset, path.Length);
+                    subs[upto] = BasicAutomata.MakeString(path.Int32s, path.Offset, path.Length);
                     upto++;
                 }
                 else
                 {
-                    Automaton prefix = BasicAutomata.MakeString(path.Ints, path.Offset, nonFuzzyPrefix);
+                    Automaton prefix = BasicAutomata.MakeString(path.Int32s, path.Offset, nonFuzzyPrefix);
                     int[] ints = new int[path.Length - nonFuzzyPrefix];
-                    Array.Copy(path.Ints, path.Offset + nonFuzzyPrefix, ints, 0, ints.Length);
+                    Array.Copy(path.Int32s, path.Offset + nonFuzzyPrefix, ints, 0, ints.Length);
                     // TODO: maybe add alphaMin to LevenshteinAutomata,
                     // and pass 1 instead of 0?  We probably don't want
                     // to allow the trailing dedup bytes to be

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionBuilder.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionBuilder.cs
index 7bac69c..ae68e3f 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionBuilder.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionBuilder.cs
@@ -261,7 +261,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                 count++;
                 if (scratch.CompareTo(entry) != 0)
                 {
-                    builder.Add(Util.Fst.Util.ToIntsRef(entry, scratchIntsRef), empty);
+                    builder.Add(Util.Fst.Util.ToInt32sRef(entry, scratchIntsRef), empty);
                     scratch.CopyBytes(entry);
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
index 7d30394..5dcce06 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
@@ -169,7 +169,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                     }
 
                     output.Reset(buffer);
-                    output.WriteInt(EncodeWeight(iterator.Weight));
+                    output.WriteInt32(EncodeWeight(iterator.Weight));
                     output.WriteBytes(spare.Bytes, spare.Offset, spare.Length);
                     writer.Write(buffer, 0, output.Position);
                 }
@@ -192,7 +192,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                 while (reader.Read(tmp1))
                 {
                     input.Reset(tmp1.Bytes);
-                    int currentScore = input.ReadInt();
+                    int currentScore = input.ReadInt32();
 
                     int bucket;
                     if (line > 0 && currentScore == previousScore)
@@ -290,7 +290,7 @@ namespace Lucene.Net.Search.Suggest.Fst
         {
             lock (this)
             {
-                output.WriteVLong(count);
+                output.WriteVInt64(count);
                 if (this.normalCompletion == null || normalCompletion.FST == null)
                 {
                     return false;
@@ -304,7 +304,7 @@ namespace Lucene.Net.Search.Suggest.Fst
         {
             lock (this)
             {
-                count = input.ReadVLong();
+                count = input.ReadVInt64();
                 this.higherWeightsCompletion = new FSTCompletion(new FST<object>(input, NoOutputs.Singleton));
                 this.normalCompletion = new FSTCompletion(higherWeightsCompletion.FST, false, exactMatchFirst);
                 return true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
index 72e0bef..0b4a408 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
@@ -106,7 +106,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                     continue; // for duplicate suggestions, the best weight is actually
                     // added
                 }
-                Lucene.Net.Util.Fst.Util.ToIntsRef(scratch, scratchInts);
+                Lucene.Net.Util.Fst.Util.ToInt32sRef(scratch, scratchInts);
                 builder.Add(scratchInts, cost);
                 previous.CopyBytes(scratch);
                 count++;
@@ -116,7 +116,7 @@ namespace Lucene.Net.Search.Suggest.Fst
 
         public override bool Store(DataOutput output)
         {
-            output.WriteVLong(count);
+            output.WriteVInt64(count);
             if (fst == null)
             {
                 return false;
@@ -127,7 +127,7 @@ namespace Lucene.Net.Search.Suggest.Fst
 
         public override bool Load(DataInput input)
         {
-            count = input.ReadVLong();
+            count = input.ReadVInt64();
             this.fst = new FST<long?>(input, PositiveIntOutputs.Singleton);
             return true;
         }
@@ -303,7 +303,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                 }
                 output.Reset(buffer);
                 output.WriteBytes(spare.Bytes, spare.Offset, spare.Length);
-                output.WriteInt(EncodeWeight(weight));
+                output.WriteInt32(EncodeWeight(weight));
                 writer.Write(buffer, 0, output.Position);
             }
 
@@ -312,7 +312,7 @@ namespace Lucene.Net.Search.Suggest.Fst
                 scratch.Length -= 4; // int
                 // skip suggestion:
                 tmpInput.Reset(scratch.Bytes, scratch.Offset + scratch.Length, 4);
-                return tmpInput.ReadInt();
+                return tmpInput.ReadInt32();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellLookup.cs b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellLookup.cs
index f91503d..f32b5d0 100644
--- a/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Jaspell/JaspellLookup.cs
@@ -166,7 +166,7 @@ namespace Lucene.Net.Search.Suggest.Jaspell
             sbyte mask = (sbyte)@in.ReadByte();
             if ((mask & HAS_VALUE) != 0)
             {
-                node.data = Convert.ToInt64(@in.ReadLong());
+                node.data = Convert.ToInt64(@in.ReadInt64());
             }
             if ((mask & LO_KID) != 0)
             {
@@ -215,7 +215,7 @@ namespace Lucene.Net.Search.Suggest.Jaspell
             @out.WriteByte((byte)mask);
             if (node.data != null)
             {
-                @out.WriteLong((long)(node.data));
+                @out.WriteInt64((long)(node.data));
             }
             WriteRecursively(@out, node.relatives[JaspellTernarySearchTrie.TSTNode.LOKID]);
             WriteRecursively(@out, node.relatives[JaspellTernarySearchTrie.TSTNode.EQKID]);
@@ -224,7 +224,7 @@ namespace Lucene.Net.Search.Suggest.Jaspell
 
         public override bool Store(DataOutput output)
         {
-            output.WriteVLong(count);
+            output.WriteVInt64(count);
             JaspellTernarySearchTrie.TSTNode root = trie.Root;
             if (root == null) // empty tree
             {
@@ -236,7 +236,7 @@ namespace Lucene.Net.Search.Suggest.Jaspell
 
         public override bool Load(DataInput input)
         {
-            count = input.ReadVLong();
+            count = input.ReadVInt64();
             var root = new JaspellTernarySearchTrie.TSTNode(trie, '\0', null);
             ReadRecursively(input, root);
             trie.Root = root;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs b/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs
index b9e7c31..f1016ac 100644
--- a/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs
+++ b/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs
@@ -292,16 +292,16 @@ namespace Lucene.Net.Search.Suggest
                 foreach (BytesRef ctx in contexts)
                 {
                     output.WriteBytes(ctx.Bytes, ctx.Offset, ctx.Length);
-                    output.WriteShort((short)ctx.Length);
+                    output.WriteInt16((short)ctx.Length);
                 }
-                output.WriteShort((short)contexts.Count());
+                output.WriteInt16((short)contexts.Count());
             }
             if (hasPayloads)
             {
                 output.WriteBytes(payload.Bytes, payload.Offset, payload.Length);
-                output.WriteShort((short)payload.Length);
+                output.WriteInt16((short)payload.Length);
             }
-            output.WriteLong(weight);
+            output.WriteInt64(weight);
             writer.Write(buffer, 0, output.Position);
         }
 
@@ -312,7 +312,7 @@ namespace Lucene.Net.Search.Suggest
             tmpInput.Reset(scratch.Bytes);
             tmpInput.SkipBytes(scratch.Length - 8); // suggestion
             scratch.Length -= 8; // long
-            return tmpInput.ReadLong();
+            return tmpInput.ReadInt64();
         }
 
         /// <summary>
@@ -321,14 +321,14 @@ namespace Lucene.Net.Search.Suggest
         {
             tmpInput.Reset(scratch.Bytes);
             tmpInput.SkipBytes(scratch.Length - 2); //skip to context set size
-            ushort ctxSetSize = (ushort)tmpInput.ReadShort();
+            ushort ctxSetSize = (ushort)tmpInput.ReadInt16();
             scratch.Length -= 2;
 
             var contextSet = new HashSet<BytesRef>();
             for (ushort i = 0; i < ctxSetSize; i++)
             {
                 tmpInput.Position = scratch.Length - 2;
-                ushort curContextLength = (ushort)tmpInput.ReadShort();
+                ushort curContextLength = (ushort)tmpInput.ReadInt16();
                 scratch.Length -= 2;
                 tmpInput.Position = scratch.Length - curContextLength;
                 BytesRef contextSpare = new BytesRef(curContextLength);
@@ -353,7 +353,7 @@ namespace Lucene.Net.Search.Suggest
         {
             tmpInput.Reset(scratch.Bytes);
             tmpInput.SkipBytes(scratch.Length - 2); // skip to payload size
-            ushort payloadLength = (ushort)tmpInput.ReadShort(); // read payload size
+            ushort payloadLength = (ushort)tmpInput.ReadInt16(); // read payload size
             tmpInput.Position = scratch.Length - 2 - payloadLength; // setPosition to start of payload
             BytesRef payloadScratch = new BytesRef(payloadLength);
             tmpInput.ReadBytes(payloadScratch.Bytes, 0, payloadLength); // read payload

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs b/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs
index f171bb6..f808890 100644
--- a/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs
+++ b/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs
@@ -213,7 +213,7 @@ namespace Lucene.Net.Search.Suggest
             }
             output.Reset(buffer);
             output.WriteBytes(spare.Bytes, spare.Offset, spare.Length);
-            output.WriteLong(weight);
+            output.WriteInt64(weight);
             writer.Write(buffer, 0, output.Position);
         }
 
@@ -224,7 +224,7 @@ namespace Lucene.Net.Search.Suggest
             tmpInput.Reset(scratch.Bytes);
             tmpInput.SkipBytes(scratch.Length - 8); // suggestion
             scratch.Length -= 8; // long
-            return tmpInput.ReadLong();
+            return tmpInput.ReadInt64();
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs b/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
index 362b5e8..61a13a3 100644
--- a/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Tst/TSTLookup.cs
@@ -185,7 +185,7 @@ namespace Lucene.Net.Search.Suggest.Tst
             }
             if ((mask & HAS_VALUE) != 0)
             {
-                node.val = Convert.ToInt64(@in.ReadLong());
+                node.val = Convert.ToInt64(@in.ReadInt64());
             }
             if ((mask & LO_KID) != 0)
             {
@@ -238,7 +238,7 @@ namespace Lucene.Net.Search.Suggest.Tst
             }
             if (node.val != null)
             {
-                @out.WriteLong((long)node.val);
+                @out.WriteInt64((long)node.val);
             }
             // recurse and write kids
             if (node.loKid != null)
@@ -259,7 +259,7 @@ namespace Lucene.Net.Search.Suggest.Tst
         {
             lock (this)
             {
-                output.WriteVLong(count);
+                output.WriteVInt64(count);
                 WriteRecursively(output, root);
                 return true;
             }
@@ -269,7 +269,7 @@ namespace Lucene.Net.Search.Suggest.Tst
         {
             lock (this)
             {
-                count = input.ReadVLong();
+                count = input.ReadVInt64();
                 root = new TernaryTreeNode();
                 ReadRecursively(input, root);
                 return true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
index 224a385..7a3fc76 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockFixedIntBlockPostingsFormat.cs
@@ -106,7 +106,7 @@ namespace Lucene.Net.Codecs.IntBlock
                     {
                         for (int i = 0; i < buffer.Length; i++)
                         {
-                            buffer[i] = @in.ReadVInt();
+                            buffer[i] = @in.ReadVInt32();
                         }
                     }
                 }
@@ -144,7 +144,7 @@ namespace Lucene.Net.Codecs.IntBlock
             {
                 for (int i = 0; i < m_buffer.Length; i++)
                 {
-                    m_output.WriteVInt(m_buffer[i]);
+                    m_output.WriteVInt32(m_buffer[i]);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
index ba69c73..99878b0 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockIntBlock/MockVariableIntBlockPostingsFormat.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Codecs.IntBlock
             public override IntIndexInput OpenInput(Directory dir, string fileName, IOContext context)
             {
                 IndexInput input = dir.OpenInput(fileName, context);
-                int baseBlockSize = input.ReadInt();
+                int baseBlockSize = input.ReadInt32();
                 return new VariableIntBlockIndexInputAnonymousHelper(input, baseBlockSize);
             }
 
@@ -105,12 +105,12 @@ namespace Lucene.Net.Codecs.IntBlock
 
                     public int ReadBlock()
                     {
-                        buffer[0] = input.ReadVInt();
+                        buffer[0] = input.ReadVInt32();
                         int count = buffer[0] <= 3 ? baseBlockSize - 1 : 2 * baseBlockSize - 1;
                         Debug.Assert(buffer.Length >= count, "buffer.length=" + buffer.Length + " count=" + count);
                         for (int i = 0; i < count; i++)
                         {
-                            buffer[i + 1] = input.ReadVInt();
+                            buffer[i + 1] = input.ReadVInt32();
                         }
                         return 1 + count;
                     }
@@ -123,7 +123,7 @@ namespace Lucene.Net.Codecs.IntBlock
                 bool success = false;
                 try
                 {
-                    output.WriteInt(baseBlockSize);
+                    output.WriteInt32(baseBlockSize);
                     VariableIntBlockIndexOutput ret = new VariableIntBlockIndexOutputAnonymousHelper(output, 2 * baseBlockSize);
                     success = true;
                     return ret;
@@ -164,7 +164,7 @@ namespace Lucene.Net.Codecs.IntBlock
                 {
                     for (int i = 0; i < flushAt; i++)
                     {
-                        m_output.WriteVInt(buffer[i]);
+                        m_output.WriteVInt32(buffer[i]);
                     }
                     buffer[0] = buffer[flushAt];
                     pendingCount = 1;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
index d5affba..e949505 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
@@ -67,7 +67,7 @@ namespace Lucene.Net.Codecs.MockSep
             public override int Next()
             {
                 //System.out.println("msii.next() fp=" + in.getFilePointer() + " vs " + in.length());
-                return @in.ReadVInt();
+                return @in.ReadVInt32();
             }
         }
 
@@ -79,11 +79,11 @@ namespace Lucene.Net.Codecs.MockSep
             {
                 if (absolute)
                 {
-                    fp = indexIn.ReadVLong();
+                    fp = indexIn.ReadVInt64();
                 }
                 else
                 {
-                    fp += indexIn.ReadVLong();
+                    fp += indexIn.ReadVInt64();
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
index 13b0996..47d6a29 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexOutput.cs
@@ -37,7 +37,7 @@ namespace Lucene.Net.Codecs.MockSep
 
         public override void Write(int v)
         {
-            @out.WriteVInt(v);
+            @out.WriteVInt32(v);
         }
 
         public override AbstractIndex GetIndex()
@@ -84,11 +84,11 @@ namespace Lucene.Net.Codecs.MockSep
             {
                 if (absolute)
                 {
-                    indexOut.WriteVLong(fp);
+                    indexOut.WriteVInt64(fp);
                 }
                 else
                 {
-                    indexOut.WriteVLong(fp - lastFP);
+                    indexOut.WriteVInt64(fp - lastFP);
                 }
                 lastFP = fp;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosReader.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosReader.cs
index c014da6..458951e 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosReader.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosReader.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
             try
             {
-                int format = input.ReadVInt();
+                int format = input.ReadVInt32();
 
                 if (format > FORMAT_MINIMUM)
                 {
@@ -58,13 +58,13 @@ namespace Lucene.Net.Codecs.Lucene3x
                     throw new IndexFormatTooNewException(input, format, FORMAT_MINIMUM, PreFlexRWFieldInfosWriter.FORMAT_CURRENT);
                 }
 
-                int size = input.ReadVInt(); //read in the size
+                int size = input.ReadVInt32(); //read in the size
                 FieldInfo[] infos = new FieldInfo[size];
 
                 for (int i = 0; i < size; i++)
                 {
                     string name = input.ReadString();
-                    int fieldNumber = format == PreFlexRWFieldInfosWriter.FORMAT_PREFLEX_RW ? input.ReadInt() : i;
+                    int fieldNumber = format == PreFlexRWFieldInfosWriter.FORMAT_PREFLEX_RW ? input.ReadInt32() : i;
                     byte bits = input.ReadByte();
                     bool isIndexed = (bits & PreFlexRWFieldInfosWriter.IS_INDEXED) != 0;
                     bool storeTermVector = (bits & PreFlexRWFieldInfosWriter.STORE_TERMVECTOR) != 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosWriter.cs
index b70f86b..e0fef49 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldInfosWriter.cs
@@ -66,8 +66,8 @@ namespace Lucene.Net.Codecs.Lucene3x
             bool success = false;
             try
             {
-                output.WriteVInt(FORMAT_PREFLEX_RW);
-                output.WriteVInt(infos.Count);
+                output.WriteVInt32(FORMAT_PREFLEX_RW);
+                output.WriteVInt32(infos.Count);
                 foreach (FieldInfo fi in infos)
                 {
                     sbyte bits = 0x0;
@@ -102,7 +102,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                      * to stabelize the field numbers across segments so the
                      * FI ordinal is not necessarily equivalent to the field number
                      */
-                    output.WriteInt(fi.Number);
+                    output.WriteInt32(fi.Number);
                     output.WriteByte((byte)bits);
                     if (fi.IsIndexed && !fi.OmitsNorms)
                     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldsWriter.cs
index 4e22cf5..b0c8174 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWFieldsWriter.cs
@@ -171,19 +171,19 @@ namespace Lucene.Net.Codecs.Lucene3x
 
                     if (OuterInstance.OmitTF)
                     {
-                        OuterInstance.OuterInstance.FreqOut.WriteVInt(delta);
+                        OuterInstance.OuterInstance.FreqOut.WriteVInt32(delta);
                     }
                     else
                     {
                         int code = delta << 1;
                         if (termDocFreq == 1)
                         {
-                            OuterInstance.OuterInstance.FreqOut.WriteVInt(code | 1);
+                            OuterInstance.OuterInstance.FreqOut.WriteVInt32(code | 1);
                         }
                         else
                         {
-                            OuterInstance.OuterInstance.FreqOut.WriteVInt(code);
-                            OuterInstance.OuterInstance.FreqOut.WriteVInt(termDocFreq);
+                            OuterInstance.OuterInstance.FreqOut.WriteVInt32(code);
+                            OuterInstance.OuterInstance.FreqOut.WriteVInt32(termDocFreq);
                         }
                     }
                     LastPosition = 0;
@@ -205,12 +205,12 @@ namespace Lucene.Net.Codecs.Lucene3x
                         {
                             //System.out.println("        write payload len=" + payloadLength);
                             LastPayloadLength = payloadLength;
-                            OuterInstance.OuterInstance.ProxOut.WriteVInt((delta << 1) | 1);
-                            OuterInstance.OuterInstance.ProxOut.WriteVInt(payloadLength);
+                            OuterInstance.OuterInstance.ProxOut.WriteVInt32((delta << 1) | 1);
+                            OuterInstance.OuterInstance.ProxOut.WriteVInt32(payloadLength);
                         }
                         else
                         {
-                            OuterInstance.OuterInstance.ProxOut.WriteVInt(delta << 1);
+                            OuterInstance.OuterInstance.ProxOut.WriteVInt32(delta << 1);
                         }
                         if (payloadLength > 0)
                         {
@@ -219,7 +219,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     }
                     else
                     {
-                        OuterInstance.OuterInstance.ProxOut.WriteVInt(delta);
+                        OuterInstance.OuterInstance.ProxOut.WriteVInt32(delta);
                     }
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWSkipListWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWSkipListWriter.cs
index c3aff4f..0ce2d24 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWSkipListWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWSkipListWriter.cs
@@ -109,25 +109,25 @@ namespace Lucene.Net.Codecs.Lucene3x
                 {
                     // the current payload length equals the length at the previous skip point,
                     // so we don't store the length again
-                    skipBuffer.WriteVInt(delta * 2);
+                    skipBuffer.WriteVInt32(delta * 2);
                 }
                 else
                 {
                     // the payload length is different from the previous one. We shift the DocSkip,
                     // set the lowest bit and store the current payload length as VInt.
-                    skipBuffer.WriteVInt(delta * 2 + 1);
-                    skipBuffer.WriteVInt(CurPayloadLength);
+                    skipBuffer.WriteVInt32(delta * 2 + 1);
+                    skipBuffer.WriteVInt32(CurPayloadLength);
                     LastSkipPayloadLength[level] = CurPayloadLength;
                 }
             }
             else
             {
                 // current field does not store payloads
-                skipBuffer.WriteVInt(CurDoc - LastSkipDoc[level]);
+                skipBuffer.WriteVInt32(CurDoc - LastSkipDoc[level]);
             }
 
-            skipBuffer.WriteVInt((int)(CurFreqPointer - LastSkipFreqPointer[level]));
-            skipBuffer.WriteVInt((int)(CurProxPointer - LastSkipProxPointer[level]));
+            skipBuffer.WriteVInt32((int)(CurFreqPointer - LastSkipFreqPointer[level]));
+            skipBuffer.WriteVInt32((int)(CurProxPointer - LastSkipProxPointer[level]));
 
             LastSkipDoc[level] = CurDoc;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
index fb38f4a..628564a 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWStoredFieldsWriter.cs
@@ -53,8 +53,8 @@ namespace Lucene.Net.Codecs.Lucene3x
                 FieldsStream = directory.CreateOutput(IndexFileNames.SegmentFileName(segment, "", Lucene3xStoredFieldsReader.FIELDS_EXTENSION), context);
                 IndexStream = directory.CreateOutput(IndexFileNames.SegmentFileName(segment, "", Lucene3xStoredFieldsReader.FIELDS_INDEX_EXTENSION), context);
 
-                FieldsStream.WriteInt(Lucene3xStoredFieldsReader.FORMAT_CURRENT);
-                IndexStream.WriteInt(Lucene3xStoredFieldsReader.FORMAT_CURRENT);
+                FieldsStream.WriteInt32(Lucene3xStoredFieldsReader.FORMAT_CURRENT);
+                IndexStream.WriteInt32(Lucene3xStoredFieldsReader.FORMAT_CURRENT);
 
                 success = true;
             }
@@ -73,8 +73,8 @@ namespace Lucene.Net.Codecs.Lucene3x
         // in the correct fields format.
         public override void StartDocument(int numStoredFields)
         {
-            IndexStream.WriteLong(FieldsStream.FilePointer);
-            FieldsStream.WriteVInt(numStoredFields);
+            IndexStream.WriteInt64(FieldsStream.FilePointer);
+            FieldsStream.WriteVInt32(numStoredFields);
         }
 
         protected override void Dispose(bool disposing)
@@ -108,7 +108,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         public override void WriteField(FieldInfo info, IIndexableField field)
         {
-            FieldsStream.WriteVInt(info.Number);
+            FieldsStream.WriteVInt32(info.Number);
             int bits = 0;
             BytesRef bytes;
             string @string;
@@ -165,7 +165,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
             if (bytes != null)
             {
-                FieldsStream.WriteVInt(bytes.Length);
+                FieldsStream.WriteVInt32(bytes.Length);
                 FieldsStream.WriteBytes(bytes.Bytes, bytes.Offset, bytes.Length);
             }
             else if (@string != null)
@@ -176,19 +176,19 @@ namespace Lucene.Net.Codecs.Lucene3x
             {
                 if (number is sbyte? || number is short? || number is int?)
                 {
-                    FieldsStream.WriteInt((int)number);
+                    FieldsStream.WriteInt32((int)number);
                 }
                 else if (number is long?)
                 {
-                    FieldsStream.WriteLong((long)number);
+                    FieldsStream.WriteInt64((long)number);
                 }
                 else if (number is float?)
                 {
-                    FieldsStream.WriteInt(Number.FloatToIntBits((float)number));
+                    FieldsStream.WriteInt32(Number.SingleToInt32Bits((float)number));
                 }
                 else if (number is double?)
                 {
-                    FieldsStream.WriteLong(BitConverter.DoubleToInt64Bits((double)number));
+                    FieldsStream.WriteInt64(BitConverter.DoubleToInt64Bits((double)number));
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWTermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWTermVectorsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWTermVectorsWriter.cs
index d074af2..db3e4c3 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWTermVectorsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/PreFlexRWTermVectorsWriter.cs
@@ -49,11 +49,11 @@ namespace Lucene.Net.Codecs.Lucene3x
             {
                 // Open files for TermVector storage
                 Tvx = directory.CreateOutput(IndexFileNames.SegmentFileName(segment, "", Lucene3xTermVectorsReader.VECTORS_INDEX_EXTENSION), context);
-                Tvx.WriteInt(Lucene3xTermVectorsReader.FORMAT_CURRENT);
+                Tvx.WriteInt32(Lucene3xTermVectorsReader.FORMAT_CURRENT);
                 Tvd = directory.CreateOutput(IndexFileNames.SegmentFileName(segment, "", Lucene3xTermVectorsReader.VECTORS_DOCUMENTS_EXTENSION), context);
-                Tvd.WriteInt(Lucene3xTermVectorsReader.FORMAT_CURRENT);
+                Tvd.WriteInt32(Lucene3xTermVectorsReader.FORMAT_CURRENT);
                 Tvf = directory.CreateOutput(IndexFileNames.SegmentFileName(segment, "", Lucene3xTermVectorsReader.VECTORS_FIELDS_EXTENSION), context);
-                Tvf.WriteInt(Lucene3xTermVectorsReader.FORMAT_CURRENT);
+                Tvf.WriteInt32(Lucene3xTermVectorsReader.FORMAT_CURRENT);
                 success = true;
             }
             finally
@@ -69,9 +69,9 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             LastFieldName = null;
             this.NumVectorFields = numVectorFields;
-            Tvx.WriteLong(Tvd.FilePointer);
-            Tvx.WriteLong(Tvf.FilePointer);
-            Tvd.WriteVInt(numVectorFields);
+            Tvx.WriteInt64(Tvd.FilePointer);
+            Tvx.WriteInt64(Tvf.FilePointer);
+            Tvd.WriteVInt32(numVectorFields);
             FieldCount = 0;
             Fps = ArrayUtil.Grow(Fps, numVectorFields);
         }
@@ -93,8 +93,8 @@ namespace Lucene.Net.Codecs.Lucene3x
             this.Offsets = offsets;
             LastTerm.Length = 0;
             Fps[FieldCount++] = Tvf.FilePointer;
-            Tvd.WriteVInt(info.Number);
-            Tvf.WriteVInt(numTerms);
+            Tvd.WriteVInt32(info.Number);
+            Tvf.WriteVInt32(numTerms);
             sbyte bits = 0x0;
             if (positions)
             {
@@ -113,7 +113,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                 // this is crazy because the file format is crazy!
                 for (int i = 1; i < FieldCount; i++)
                 {
-                    Tvd.WriteVLong(Fps[i] - Fps[i - 1]);
+                    Tvd.WriteVInt64(Fps[i] - Fps[i - 1]);
                 }
             }
         }
@@ -134,10 +134,10 @@ namespace Lucene.Net.Codecs.Lucene3x
         {
             int prefix = StringHelper.BytesDifference(LastTerm, term);
             int suffix = term.Length - prefix;
-            Tvf.WriteVInt(prefix);
-            Tvf.WriteVInt(suffix);
+            Tvf.WriteVInt32(prefix);
+            Tvf.WriteVInt32(suffix);
             Tvf.WriteBytes(term.Bytes, term.Offset + prefix, suffix);
-            Tvf.WriteVInt(freq);
+            Tvf.WriteVInt32(freq);
             LastTerm.CopyBytes(term);
             LastPosition = LastOffset = 0;
 
@@ -160,7 +160,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             if (Positions && Offsets)
             {
                 // write position delta
-                Tvf.WriteVInt(position - LastPosition);
+                Tvf.WriteVInt32(position - LastPosition);
                 LastPosition = position;
 
                 // buffer offsets
@@ -173,8 +173,8 @@ namespace Lucene.Net.Codecs.Lucene3x
                 {
                     for (int i = 0; i < OffsetIndex; i++)
                     {
-                        Tvf.WriteVInt(OffsetStartBuffer[i] - LastOffset);
-                        Tvf.WriteVInt(OffsetEndBuffer[i] - OffsetStartBuffer[i]);
+                        Tvf.WriteVInt32(OffsetStartBuffer[i] - LastOffset);
+                        Tvf.WriteVInt32(OffsetEndBuffer[i] - OffsetStartBuffer[i]);
                         LastOffset = OffsetEndBuffer[i];
                     }
                 }
@@ -182,14 +182,14 @@ namespace Lucene.Net.Codecs.Lucene3x
             else if (Positions)
             {
                 // write position delta
-                Tvf.WriteVInt(position - LastPosition);
+                Tvf.WriteVInt32(position - LastPosition);
                 LastPosition = position;
             }
             else if (Offsets)
             {
                 // write offset deltas
-                Tvf.WriteVInt(startOffset - LastOffset);
-                Tvf.WriteVInt(endOffset - startOffset);
+                Tvf.WriteVInt32(startOffset - LastOffset);
+                Tvf.WriteVInt32(endOffset - startOffset);
                 LastOffset = endOffset;
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene3x/TermInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene3x/TermInfosWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene3x/TermInfosWriter.cs
index 79e59f9..fd7c05d 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene3x/TermInfosWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene3x/TermInfosWriter.cs
@@ -136,11 +136,11 @@ namespace Lucene.Net.Codecs.Lucene3x
             bool success = false;
             try
             {
-                Output.WriteInt(FORMAT_CURRENT); // write format
-                Output.WriteLong(0); // leave space for size
-                Output.WriteInt(IndexInterval); // write indexInterval
-                Output.WriteInt(SkipInterval); // write skipInterval
-                Output.WriteInt(MaxSkipLevels); // write maxSkipLevels
+                Output.WriteInt32(FORMAT_CURRENT); // write format
+                Output.WriteInt64(0); // leave space for size
+                Output.WriteInt32(IndexInterval); // write indexInterval
+                Output.WriteInt32(SkipInterval); // write skipInterval
+                Output.WriteInt32(MaxSkipLevels); // write maxSkipLevels
                 Debug.Assert(InitUTF16Results());
                 success = true;
             }
@@ -260,18 +260,18 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             WriteTerm(fieldNumber, term); // write term
 
-            Output.WriteVInt(ti.DocFreq); // write doc freq
-            Output.WriteVLong(ti.FreqPointer - LastTi.FreqPointer); // write pointers
-            Output.WriteVLong(ti.ProxPointer - LastTi.ProxPointer);
+            Output.WriteVInt32(ti.DocFreq); // write doc freq
+            Output.WriteVInt64(ti.FreqPointer - LastTi.FreqPointer); // write pointers
+            Output.WriteVInt64(ti.ProxPointer - LastTi.ProxPointer);
 
             if (ti.DocFreq >= SkipInterval)
             {
-                Output.WriteVInt(ti.SkipOffset);
+                Output.WriteVInt32(ti.SkipOffset);
             }
 
             if (IsIndex)
             {
-                Output.WriteVLong(Other.Output.FilePointer - LastIndexPointer);
+                Output.WriteVInt64(Other.Output.FilePointer - LastIndexPointer);
                 LastIndexPointer = Other.Output.FilePointer; // write pointer
             }
 
@@ -298,10 +298,10 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
 
             int length = term.Length - start;
-            Output.WriteVInt(start); // write shared prefix length
-            Output.WriteVInt(length); // write delta length
+            Output.WriteVInt32(start); // write shared prefix length
+            Output.WriteVInt32(length); // write delta length
             Output.WriteBytes(term.Bytes, start + term.Offset, length); // write delta bytes
-            Output.WriteVInt(fieldNumber); // write field num
+            Output.WriteVInt32(fieldNumber); // write field num
             LastTerm.CopyBytes(term);
         }
 
@@ -312,7 +312,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             try
             {
                 Output.Seek(4); // write size after format
-                Output.WriteLong(Size);
+                Output.WriteInt64(Size);
             }
             finally
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40DocValuesWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40DocValuesWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40DocValuesWriter.cs
index fff5fa6..4dcf590 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40DocValuesWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40DocValuesWriter.cs
@@ -105,7 +105,7 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_8.Name);
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            output.WriteInt(1); // size
+            output.WriteInt32(1); // size
             foreach (long? n in values)
             {
                 output.WriteByte(n == null ? (byte)0 : (byte)n);
@@ -116,10 +116,10 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_16.Name);
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            output.WriteInt(2); // size
+            output.WriteInt32(2); // size
             foreach (long? n in values)
             {
-                output.WriteShort(n == null ? (short)0 : (short)n);
+                output.WriteInt16(n == null ? (short)0 : (short)n);
             }
         }
 
@@ -127,10 +127,10 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             field.PutAttribute(LegacyKey, LegacyDocValuesType.FIXED_INTS_32.Name);
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            output.WriteInt(4); // size
+            output.WriteInt32(4); // size
             foreach (long? n in values)
             {
-                output.WriteInt(n == null ? 0 : (int)n);
+                output.WriteInt32(n == null ? 0 : (int)n);
             }
         }
 
@@ -148,15 +148,15 @@ namespace Lucene.Net.Codecs.Lucene40
                 output.WriteByte((byte)Lucene40DocValuesFormat.VAR_INTS_FIXED_64);
                 foreach (long? n in values)
                 {
-                    output.WriteLong(n == null ? 0 : n.Value);
+                    output.WriteInt64(n == null ? 0 : n.Value);
                 }
             }
             else
             {
                 // writes packed ints
                 output.WriteByte((byte)Lucene40DocValuesFormat.VAR_INTS_PACKED);
-                output.WriteLong(minValue);
-                output.WriteLong(0 - minValue); // default value (representation of 0)
+                output.WriteInt64(minValue);
+                output.WriteInt64(0 - minValue); // default value (representation of 0)
                 PackedInts.Writer writer = PackedInts.GetWriter(output, State.SegmentInfo.DocCount, PackedInts.BitsRequired(delta), PackedInts.DEFAULT);
                 foreach (long? n in values)
                 {
@@ -302,7 +302,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             CodecUtil.WriteHeader(output, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_CODEC_NAME, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_VERSION_CURRENT);
 
-            output.WriteInt(length);
+            output.WriteInt32(length);
             foreach (BytesRef v in values)
             {
                 if (v != null)
@@ -336,7 +336,7 @@ namespace Lucene.Net.Codecs.Lucene40
             /* addresses */
 
             long maxAddress = data.FilePointer - startPos;
-            index.WriteVLong(maxAddress);
+            index.WriteVInt64(maxAddress);
 
             int maxDoc = State.SegmentInfo.DocCount;
             Debug.Assert(maxDoc != int.MaxValue); // unsupported by the 4.0 impl
@@ -373,7 +373,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
 
             /* values */
-            data.WriteInt(length);
+            data.WriteInt32(length);
             foreach (BytesRef v in dictionary)
             {
                 data.WriteBytes(v.Bytes, v.Offset, v.Length);
@@ -382,7 +382,7 @@ namespace Lucene.Net.Codecs.Lucene40
             /* ordinals */
             int valueCount = dictionary.Count;
             Debug.Assert(valueCount > 0);
-            index.WriteInt(valueCount);
+            index.WriteInt32(valueCount);
             int maxDoc = State.SegmentInfo.DocCount;
             PackedInts.Writer w = PackedInts.GetWriter(index, maxDoc, PackedInts.BitsRequired(valueCount - 1), PackedInts.DEFAULT);
 
@@ -431,7 +431,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             /* ordinals */
             long totalBytes = data.FilePointer - startPosition;
-            index.WriteLong(totalBytes);
+            index.WriteInt64(totalBytes);
             int maxDoc = State.SegmentInfo.DocCount;
             PackedInts.Writer w = PackedInts.GetWriter(index, maxDoc, PackedInts.BitsRequired(currentAddress), PackedInts.DEFAULT);
 
@@ -539,7 +539,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             /* values */
 
-            data.WriteInt(length);
+            data.WriteInt32(length);
             int valueCount = 0;
             foreach (BytesRef v in values)
             {
@@ -549,7 +549,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             /* ordinals */
 
-            index.WriteInt(valueCount);
+            index.WriteInt32(valueCount);
             int maxDoc = State.SegmentInfo.DocCount;
             Debug.Assert(valueCount > 0);
             PackedInts.Writer w = PackedInts.GetWriter(index, maxDoc, PackedInts.BitsRequired(valueCount - 1), PackedInts.DEFAULT);
@@ -582,7 +582,7 @@ namespace Lucene.Net.Codecs.Lucene40
             /* addresses */
 
             long maxAddress = data.FilePointer - startPos;
-            index.WriteLong(maxAddress);
+            index.WriteInt64(maxAddress);
 
             Debug.Assert(valueCount != int.MaxValue); // unsupported by the 4.0 impl
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40FieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40FieldInfosWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40FieldInfosWriter.cs
index 765c175..688e365 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40FieldInfosWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40FieldInfosWriter.cs
@@ -54,7 +54,7 @@ namespace Lucene.Net.Codecs.Lucene40
             try
             {
                 CodecUtil.WriteHeader(output, Lucene40FieldInfosFormat.CODEC_NAME, Lucene40FieldInfosFormat.FORMAT_CURRENT);
-                output.WriteVInt(infos.Count);
+                output.WriteVInt32(infos.Count);
                 foreach (FieldInfo fi in infos)
                 {
                     IndexOptions? indexOptions = fi.IndexOptions;
@@ -89,7 +89,7 @@ namespace Lucene.Net.Codecs.Lucene40
                         }
                     }
                     output.WriteString(fi.Name);
-                    output.WriteVInt(fi.Number);
+                    output.WriteVInt32(fi.Number);
                     output.WriteByte((byte)bits);
 
                     // pack the DV types in one byte

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40PostingsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40PostingsWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40PostingsWriter.cs
index 45620ae..11e2dc0 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40PostingsWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40PostingsWriter.cs
@@ -152,9 +152,9 @@ namespace Lucene.Net.Codecs.Lucene40
         public override void Init(IndexOutput termsOut)
         {
             CodecUtil.WriteHeader(termsOut, Lucene40PostingsReader.TERMS_CODEC, Lucene40PostingsReader.VERSION_CURRENT);
-            termsOut.WriteInt(SkipInterval); // write skipInterval
-            termsOut.WriteInt(MaxSkipLevels); // write maxSkipLevels
-            termsOut.WriteInt(SkipMinimum); // write skipMinimum
+            termsOut.WriteInt32(SkipInterval); // write skipInterval
+            termsOut.WriteInt32(MaxSkipLevels); // write maxSkipLevels
+            termsOut.WriteInt32(SkipMinimum); // write skipMinimum
         }
 
         public override BlockTermState NewTermState()
@@ -225,16 +225,16 @@ namespace Lucene.Net.Codecs.Lucene40
             LastDocID = docID;
             if (IndexOptions == Index.IndexOptions.DOCS_ONLY)
             {
-                FreqOut.WriteVInt(delta);
+                FreqOut.WriteVInt32(delta);
             }
             else if (1 == termDocFreq)
             {
-                FreqOut.WriteVInt((delta << 1) | 1);
+                FreqOut.WriteVInt32((delta << 1) | 1);
             }
             else
             {
-                FreqOut.WriteVInt(delta << 1);
-                FreqOut.WriteVInt(termDocFreq);
+                FreqOut.WriteVInt32(delta << 1);
+                FreqOut.WriteVInt32(termDocFreq);
             }
 
             LastPosition = 0;
@@ -264,17 +264,17 @@ namespace Lucene.Net.Codecs.Lucene40
                 if (payloadLength != LastPayloadLength)
                 {
                     LastPayloadLength = payloadLength;
-                    ProxOut.WriteVInt((delta << 1) | 1);
-                    ProxOut.WriteVInt(payloadLength);
+                    ProxOut.WriteVInt32((delta << 1) | 1);
+                    ProxOut.WriteVInt32(payloadLength);
                 }
                 else
                 {
-                    ProxOut.WriteVInt(delta << 1);
+                    ProxOut.WriteVInt32(delta << 1);
                 }
             }
             else
             {
-                ProxOut.WriteVInt(delta);
+                ProxOut.WriteVInt32(delta);
             }
 
             if (StoreOffsets)
@@ -286,12 +286,12 @@ namespace Lucene.Net.Codecs.Lucene40
                 Debug.Assert(offsetDelta >= 0 && offsetLength >= 0, "startOffset=" + startOffset + ",lastOffset=" + LastOffset + ",endOffset=" + endOffset);
                 if (offsetLength != LastOffsetLength)
                 {
-                    ProxOut.WriteVInt(offsetDelta << 1 | 1);
-                    ProxOut.WriteVInt(offsetLength);
+                    ProxOut.WriteVInt32(offsetDelta << 1 | 1);
+                    ProxOut.WriteVInt32(offsetLength);
                 }
                 else
                 {
-                    ProxOut.WriteVInt(offsetDelta << 1);
+                    ProxOut.WriteVInt32(offsetDelta << 1);
                 }
                 LastOffset = startOffset;
                 LastOffsetLength = offsetLength;
@@ -346,15 +346,15 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 LastState = EmptyState;
             }
-            @out.WriteVLong(state.FreqStart - LastState.FreqStart);
+            @out.WriteVInt64(state.FreqStart - LastState.FreqStart);
             if (state.SkipOffset != -1)
             {
                 Debug.Assert(state.SkipOffset > 0);
-                @out.WriteVLong(state.SkipOffset);
+                @out.WriteVInt64(state.SkipOffset);
             }
             if (IndexOptions >= Index.IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
             {
-                @out.WriteVLong(state.ProxStart - LastState.ProxStart);
+                @out.WriteVInt64(state.ProxStart - LastState.ProxStart);
             }
             LastState = state;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40SkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40SkipListWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40SkipListWriter.cs
index 06f9514..aa8e52e 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40SkipListWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene40/Lucene40SkipListWriter.cs
@@ -130,22 +130,22 @@ namespace Lucene.Net.Codecs.Lucene40
                 {
                     // the current payload/offset lengths equals the lengths at the previous skip point,
                     // so we don't store the lengths again
-                    skipBuffer.WriteVInt(delta << 1);
+                    skipBuffer.WriteVInt32(delta << 1);
                 }
                 else
                 {
                     // the payload and/or offset length is different from the previous one. We shift the DocSkip,
                     // set the lowest bit and store the current payload and/or offset lengths as VInts.
-                    skipBuffer.WriteVInt(delta << 1 | 1);
+                    skipBuffer.WriteVInt32(delta << 1 | 1);
 
                     if (CurStorePayloads)
                     {
-                        skipBuffer.WriteVInt(CurPayloadLength);
+                        skipBuffer.WriteVInt32(CurPayloadLength);
                         LastSkipPayloadLength[level] = CurPayloadLength;
                     }
                     if (CurStoreOffsets)
                     {
-                        skipBuffer.WriteVInt(CurOffsetLength);
+                        skipBuffer.WriteVInt32(CurOffsetLength);
                         LastSkipOffsetLength[level] = CurOffsetLength;
                     }
                 }
@@ -153,11 +153,11 @@ namespace Lucene.Net.Codecs.Lucene40
             else
             {
                 // current field does not store payloads or offsets
-                skipBuffer.WriteVInt(delta);
+                skipBuffer.WriteVInt32(delta);
             }
 
-            skipBuffer.WriteVInt((int)(CurFreqPointer - LastSkipFreqPointer[level]));
-            skipBuffer.WriteVInt((int)(CurProxPointer - LastSkipProxPointer[level]));
+            skipBuffer.WriteVInt32((int)(CurFreqPointer - LastSkipFreqPointer[level]));
+            skipBuffer.WriteVInt32((int)(CurProxPointer - LastSkipProxPointer[level]));
 
             LastSkipDoc[level] = CurDoc;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42DocValuesConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42DocValuesConsumer.cs b/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42DocValuesConsumer.cs
index d894074..678d381 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42DocValuesConsumer.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42DocValuesConsumer.cs
@@ -87,9 +87,9 @@ namespace Lucene.Net.Codecs.Lucene42
 
         internal virtual void AddNumericField(FieldInfo field, IEnumerable<long?> values, bool optimizeStorage)
         {
-            Meta.WriteVInt(field.Number);
+            Meta.WriteVInt32(field.Number);
             Meta.WriteByte((byte)Lucene42DocValuesProducer.NUMBER);
-            Meta.WriteLong(Data.FilePointer);
+            Meta.WriteInt64(Data.FilePointer);
             long minValue = long.MaxValue;
             long maxValue = long.MinValue;
             long gcd = 0;
@@ -157,16 +157,16 @@ namespace Lucene.Net.Codecs.Lucene42
                     Meta.WriteByte((byte)Lucene42DocValuesProducer.TABLE_COMPRESSED); // table-compressed
                     long[] decode = uniqueValues.ToArray(/*new long?[uniqueValues.Count]*/);
                     var encode = new Dictionary<long, int>();
-                    Data.WriteVInt(decode.Length);
+                    Data.WriteVInt32(decode.Length);
                     for (int i = 0; i < decode.Length; i++)
                     {
-                        Data.WriteLong(decode[i]);
+                        Data.WriteInt64(decode[i]);
                         encode[decode[i]] = i;
                     }
 
-                    Meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                    Data.WriteVInt(formatAndBits.Format.Id);
-                    Data.WriteVInt(formatAndBits.BitsPerValue);
+                    Meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                    Data.WriteVInt32(formatAndBits.Format.Id);
+                    Data.WriteVInt32(formatAndBits.BitsPerValue);
 
                     PackedInts.Writer writer = PackedInts.GetWriterNoHeader(Data, formatAndBits.Format, MaxDoc, formatAndBits.BitsPerValue, PackedInts.DEFAULT_BUFFER_SIZE);
                     foreach (long? nv in values)
@@ -179,10 +179,10 @@ namespace Lucene.Net.Codecs.Lucene42
             else if (gcd != 0 && gcd != 1)
             {
                 Meta.WriteByte((byte)Lucene42DocValuesProducer.GCD_COMPRESSED);
-                Meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                Data.WriteLong(minValue);
-                Data.WriteLong(gcd);
-                Data.WriteVInt(Lucene42DocValuesProducer.BLOCK_SIZE);
+                Meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                Data.WriteInt64(minValue);
+                Data.WriteInt64(gcd);
+                Data.WriteVInt32(Lucene42DocValuesProducer.BLOCK_SIZE);
 
                 BlockPackedWriter writer = new BlockPackedWriter(Data, Lucene42DocValuesProducer.BLOCK_SIZE);
                 foreach (long? nv in values)
@@ -196,8 +196,8 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 Meta.WriteByte((byte)Lucene42DocValuesProducer.DELTA_COMPRESSED); // delta-compressed
 
-                Meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                Data.WriteVInt(Lucene42DocValuesProducer.BLOCK_SIZE);
+                Meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                Data.WriteVInt32(Lucene42DocValuesProducer.BLOCK_SIZE);
 
                 BlockPackedWriter writer = new BlockPackedWriter(Data, Lucene42DocValuesProducer.BLOCK_SIZE);
                 foreach (long? nv in values)
@@ -217,7 +217,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     if (Meta != null)
                     {
-                        Meta.WriteVInt(-1); // write EOF marker
+                        Meta.WriteVInt32(-1); // write EOF marker
                     }
                     success = true;
                 }
@@ -238,7 +238,7 @@ namespace Lucene.Net.Codecs.Lucene42
         public override void AddBinaryField(FieldInfo field, IEnumerable<BytesRef> values)
         {
             // write the byte[] data
-            Meta.WriteVInt(field.Number);
+            Meta.WriteVInt32(field.Number);
             Meta.WriteByte((byte)Lucene42DocValuesProducer.BYTES);
             int minLength = int.MaxValue;
             int maxLength = int.MinValue;
@@ -257,17 +257,17 @@ namespace Lucene.Net.Codecs.Lucene42
                     Data.WriteBytes(v.Bytes, v.Offset, v.Length);
                 }
             }
-            Meta.WriteLong(startFP);
-            Meta.WriteLong(Data.FilePointer - startFP);
-            Meta.WriteVInt(minLength);
-            Meta.WriteVInt(maxLength);
+            Meta.WriteInt64(startFP);
+            Meta.WriteInt64(Data.FilePointer - startFP);
+            Meta.WriteVInt32(minLength);
+            Meta.WriteVInt32(maxLength);
 
             // if minLength == maxLength, its a fixed-length byte[], we are done (the addresses are implicit)
             // otherwise, we need to record the length fields...
             if (minLength != maxLength)
             {
-                Meta.WriteVInt(PackedInts.VERSION_CURRENT);
-                Meta.WriteVInt(Lucene42DocValuesProducer.BLOCK_SIZE);
+                Meta.WriteVInt32(PackedInts.VERSION_CURRENT);
+                Meta.WriteVInt32(Lucene42DocValuesProducer.BLOCK_SIZE);
 
                 MonotonicBlockPackedWriter writer = new MonotonicBlockPackedWriter(Data, Lucene42DocValuesProducer.BLOCK_SIZE);
                 long addr = 0;
@@ -285,16 +285,16 @@ namespace Lucene.Net.Codecs.Lucene42
 
         private void WriteFST(FieldInfo field, IEnumerable<BytesRef> values)
         {
-            Meta.WriteVInt(field.Number);
+            Meta.WriteVInt32(field.Number);
             Meta.WriteByte((byte)Lucene42DocValuesProducer.FST);
-            Meta.WriteLong(Data.FilePointer);
+            Meta.WriteInt64(Data.FilePointer);
             PositiveIntOutputs outputs = PositiveIntOutputs.Singleton;
             Builder<long?> builder = new Builder<long?>(INPUT_TYPE.BYTE1, outputs);
             IntsRef scratch = new IntsRef();
             long ord = 0;
             foreach (BytesRef v in values)
             {
-                builder.Add(Util.ToIntsRef(v, scratch), ord);
+                builder.Add(Util.ToInt32sRef(v, scratch), ord);
                 ord++;
             }
 
@@ -303,7 +303,7 @@ namespace Lucene.Net.Codecs.Lucene42
             {
                 fst.Save(Data);
             }
-            Meta.WriteVLong(ord);
+            Meta.WriteVInt64(ord);
         }
 
         public override void AddSortedField(FieldInfo field, IEnumerable<BytesRef> values, IEnumerable<long?> docToOrd)
@@ -450,7 +450,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     Ords.MoveNext();
                     long ord = Ords.Current.Value;
-                    @out.WriteVLong(ord - lastOrd);
+                    @out.WriteVInt64(ord - lastOrd);
                     lastOrd = ord;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42FieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42FieldInfosWriter.cs b/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42FieldInfosWriter.cs
index e27c61d..acdae7b 100644
--- a/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42FieldInfosWriter.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/lucene42/Lucene42FieldInfosWriter.cs
@@ -53,7 +53,7 @@ namespace Lucene.Net.Codecs.Lucene42
             try
             {
                 CodecUtil.WriteHeader(output, Lucene42FieldInfosFormat.CODEC_NAME, Lucene42FieldInfosFormat.FORMAT_CURRENT);
-                output.WriteVInt(infos.Count);
+                output.WriteVInt32(infos.Count);
                 foreach (FieldInfo fi in infos)
                 {
                     IndexOptions? indexOptions = fi.IndexOptions;
@@ -88,7 +88,7 @@ namespace Lucene.Net.Codecs.Lucene42
                         }
                     }
                     output.WriteString(fi.Name);
-                    output.WriteVInt(fi.Number);
+                    output.WriteVInt32(fi.Number);
                     output.WriteByte((byte)bits);
 
                     // pack the DV types in one byte

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Codecs/ramonly/RAMOnlyPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/ramonly/RAMOnlyPostingsFormat.cs b/src/Lucene.Net.TestFramework/Codecs/ramonly/RAMOnlyPostingsFormat.cs
index 01180d3..7cfddf4 100644
--- a/src/Lucene.Net.TestFramework/Codecs/ramonly/RAMOnlyPostingsFormat.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/ramonly/RAMOnlyPostingsFormat.cs
@@ -672,7 +672,7 @@ namespace Lucene.Net.Codecs.ramonly
             try
             {
                 CodecUtil.WriteHeader(@out, RAM_ONLY_NAME, VERSION_LATEST);
-                @out.WriteVInt(id);
+                @out.WriteVInt32(id);
                 success = true;
             }
             finally
@@ -707,7 +707,7 @@ namespace Lucene.Net.Codecs.ramonly
             try
             {
                 CodecUtil.CheckHeader(@in, RAM_ONLY_NAME, VERSION_START, VERSION_LATEST);
-                id = @in.ReadVInt();
+                id = @in.ReadVInt32();
                 success = true;
             }
             finally

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
index 5263e05..accdbbe 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseDocValuesFormatTestCase.cs
@@ -147,7 +147,7 @@ namespace Lucene.Net.Index
                 Assert.AreEqual(text, hitDoc.Get("fieldname"));
                 Debug.Assert(ireader.Leaves.Count == 1);
                 NumericDocValues dv = ((AtomicReader)((AtomicReader)ireader.Leaves[0].Reader)).GetNumericDocValues("dv");
-                Assert.AreEqual(Number.FloatToIntBits(5.7f), dv.Get(hits.ScoreDocs[i].Doc));
+                Assert.AreEqual(Number.SingleToInt32Bits(5.7f), dv.Get(hits.ScoreDocs[i].Doc));
             }
 
             ireader.Dispose();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index c13021f..d7a414e 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -334,7 +334,7 @@ namespace Lucene.Net.Index
             foreach (AtomicReaderContext ctx in r.Leaves)
             {
                 AtomicReader sub = (AtomicReader)ctx.Reader;
-                FieldCache.Ints ids = FieldCache.DEFAULT.GetInts(sub, "id", false);
+                FieldCache.Ints ids = FieldCache.DEFAULT.GetInt32s(sub, "id", false);
                 for (int docID = 0; docID < sub.NumDocs; docID++)
                 {
                     Document doc = sub.Document(docID);
@@ -632,7 +632,7 @@ namespace Lucene.Net.Index
             {
                 int min = Random().Next(data.Length);
                 int max = min + Random().Next(20);
-                iw.DeleteDocuments(NumericRangeQuery.NewIntRange("id", min, max, true, false));
+                iw.DeleteDocuments(NumericRangeQuery.NewInt32Range("id", min, max, true, false));
             }
 
             iw.ForceMerge(2); // force merges with deletions

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
index 830f143..b6e7a95 100644
--- a/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockIndexInputWrapper.cs
@@ -139,22 +139,31 @@ namespace Lucene.Net.Store
             @delegate.ReadBytes(b, offset, len, useBuffer);
         }
 
-        public override short ReadShort()
+        /// <summary>
+        /// NOTE: this was readShort() in Lucene
+        /// </summary>
+        public override short ReadInt16()
         {
             EnsureOpen();
-            return @delegate.ReadShort();
+            return @delegate.ReadInt16();
         }
 
-        public override int ReadInt()
+        /// <summary>
+        /// NOTE: this was readInt() in Lucene
+        /// </summary>
+        public override int ReadInt32()
         {
             EnsureOpen();
-            return @delegate.ReadInt();
+            return @delegate.ReadInt32();
         }
 
-        public override long ReadLong()
+        /// <summary>
+        /// NOTE: this was readLong() in Lucene
+        /// </summary>
+        public override long ReadInt64()
         {
             EnsureOpen();
-            return @delegate.ReadLong();
+            return @delegate.ReadInt64();
         }
 
         public override string ReadString()
@@ -169,16 +178,22 @@ namespace Lucene.Net.Store
             return @delegate.ReadStringStringMap();
         }
 
-        public override int ReadVInt()
+        /// <summary>
+        /// NOTE: this was readVInt() in Lucene
+        /// </summary>
+        public override int ReadVInt32()
         {
             EnsureOpen();
-            return @delegate.ReadVInt();
+            return @delegate.ReadVInt32();
         }
 
-        public override long ReadVLong()
+        /// <summary>
+        /// NOTE: this was readVLong() in Lucene
+        /// </summary>
+        public override long ReadVInt64()
         {
             EnsureOpen();
-            return @delegate.ReadVLong();
+            return @delegate.ReadVInt64();
         }
 
         public override string ToString()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs b/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
index c060fd1..2c0e1f9 100644
--- a/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
+++ b/src/Lucene.Net.TestFramework/Util/automaton/AutomatonTestUtil.cs
@@ -361,7 +361,7 @@ namespace Lucene.Net.Util.Automaton
                     }
                 }
 
-                return ArrayUtil.ToIntArray(soFar);
+                return ArrayUtil.ToInt32Array(soFar);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs b/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
index 40b79d2..7889b94 100644
--- a/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
+++ b/src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs
@@ -74,7 +74,7 @@ namespace Lucene.Net.Util.Fst
             else
             {
                 // utf32
-                return UnicodeUtil.NewString(term.Ints, term.Offset, term.Length) + " " + term;
+                return UnicodeUtil.NewString(term.Int32s, term.Offset, term.Length) + " " + term;
             }
         }
 
@@ -83,7 +83,7 @@ namespace Lucene.Net.Util.Fst
             BytesRef br = new BytesRef(ir.Length);
             for (int i = 0; i < ir.Length; i++)
             {
-                int x = ir.Ints[ir.Offset + i];
+                int x = ir.Int32s[ir.Offset + i];
                 Debug.Assert(x >= 0 && x <= 255);
                 br.Bytes[i] = (byte)x;
             }
@@ -150,12 +150,12 @@ namespace Lucene.Net.Util.Fst
             int intIdx = 0;
             while (charIdx < charLength)
             {
-                if (intIdx == ir.Ints.Length)
+                if (intIdx == ir.Int32s.Length)
                 {
                     ir.Grow(intIdx + 1);
                 }
                 int utf32 = Character.CodePointAt(s, charIdx);
-                ir.Ints[intIdx] = utf32;
+                ir.Int32s[intIdx] = utf32;
                 charIdx += Character.CharCount(utf32);
                 intIdx++;
             }
@@ -165,13 +165,13 @@ namespace Lucene.Net.Util.Fst
 
         internal static IntsRef ToIntsRef(BytesRef br, IntsRef ir)
         {
-            if (br.Length > ir.Ints.Length)
+            if (br.Length > ir.Int32s.Length)
             {
                 ir.Grow(br.Length);
             }
             for (int i = 0; i < br.Length; i++)
             {
-                ir.Ints[i] = br.Bytes[br.Offset + i] & 0xFF;
+                ir.Int32s[i] = br.Bytes[br.Offset + i] & 0xFF;
             }
             ir.Length = br.Length;
             return ir;
@@ -232,7 +232,7 @@ namespace Lucene.Net.Util.Fst
                 }
                 else
                 {
-                    label = term.Ints[term.Offset + i];
+                    label = term.Int32s[term.Offset + i];
                 }
                 // System.out.println("   loop i=" + i + " label=" + label + " output=" + fst.Outputs.outputToString(output) + " curArc: target=" + arc.target + " isFinal?=" + arc.isFinal());
                 if (fst.FindTargetArc(label, arc, arc, fstReader) == null)
@@ -294,11 +294,11 @@ namespace Lucene.Net.Util.Fst
                     break;
                 }
 
-                if (@in.Ints.Length == @in.Length)
+                if (@in.Int32s.Length == @in.Length)
                 {
                     @in.Grow(1 + @in.Length);
                 }
-                @in.Ints[@in.Length++] = arc.Label;
+                @in.Int32s[@in.Length++] = arc.Label;
             }
 
             return output;
@@ -824,7 +824,7 @@ namespace Lucene.Net.Util.Fst
             IntsRef scratch = new IntsRef(10);
             foreach (InputOutput<T> pair in Pairs)
             {
-                scratch.CopyInts(pair.Input);
+                scratch.CopyInt32s(pair.Input);
                 for (int idx = 0; idx <= pair.Input.Length; idx++)
                 {
                     scratch.Length = idx;
@@ -893,7 +893,7 @@ namespace Lucene.Net.Util.Fst
                     {
                         // consult our parent
                         scratch.Length = prefix.Length - 1;
-                        Array.Copy(prefix.Ints, prefix.Offset, scratch.Ints, 0, scratch.Length);
+                        Array.Copy(prefix.Int32s, prefix.Offset, scratch.Int32s, 0, scratch.Length);
                         CountMinOutput<T> cmo2 = prefixes.ContainsKey(scratch) ? prefixes[scratch] : null;
                         //System.out.println("    parent count = " + (cmo2 == null ? -1 : cmo2.count));
                         keep = cmo2 != null && ((prune2 > 1 && cmo2.Count >= prune2) || (prune2 == 1 && (cmo2.Count >= 2 || prefix.Length <= 1)));
@@ -917,7 +917,7 @@ namespace Lucene.Net.Util.Fst
                 {
                     // clear isLeaf for all ancestors
                     //System.out.println("    keep");
-                    scratch.CopyInts(prefix);
+                    scratch.CopyInt32s(prefix);
                     scratch.Length--;
                     while (scratch.Length >= 0)
                     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestTypeTokenFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestTypeTokenFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestTypeTokenFilterFactory.cs
index 5a7d81d..abb83e7 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestTypeTokenFilterFactory.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestTypeTokenFilterFactory.cs
@@ -48,7 +48,7 @@ namespace Lucene.Net.Analysis.Core
         {
             TokenFilterFactory factory = TokenFilterFactory("Type", "types", "stoptypes-1.txt, stoptypes-2.txt", "enablePositionIncrements", "true");
             NumericTokenStream input = new NumericTokenStream();
-            input.SetIntValue(123); // LUCENENET TODO: Shouldn't this be a property setter?
+            input.SetInt32Value(123); // LUCENENET TODO: Shouldn't this be a property setter?
             factory.Create(input);
         }
 
@@ -57,7 +57,7 @@ namespace Lucene.Net.Analysis.Core
         {
             TokenFilterFactory factory = TokenFilterFactory("Type", "types", "stoptypes-1.txt, stoptypes-2.txt", "enablePositionIncrements", "true", "useWhitelist", "true");
             NumericTokenStream input = new NumericTokenStream();
-            input.SetIntValue(123);
+            input.SetInt32Value(123);
             factory.Create(input);
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
index bd9dfa4..ec404cf 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
@@ -45,14 +45,14 @@ namespace Lucene.Net.Analysis.Hunspell
                     assertEquals(1, ordList.Length);
 
                     BytesRef @ref = new BytesRef();
-                    dictionary.flagLookup.Get(ordList.Ints[0], @ref);
+                    dictionary.flagLookup.Get(ordList.Int32s[0], @ref);
                     char[] flags = Dictionary.DecodeFlags(@ref);
                     assertEquals(1, flags.Length);
 
                     ordList = dictionary.LookupWord(new char[] { 'l', 'u', 'c', 'e', 'n' }, 0, 5);
                     assertNotNull(ordList);
                     assertEquals(1, ordList.Length);
-                    dictionary.flagLookup.Get(ordList.Ints[0], @ref);
+                    dictionary.flagLookup.Get(ordList.Int32s[0], @ref);
                     flags = Dictionary.DecodeFlags(@ref);
                     assertEquals(1, flags.Length);
                 }
@@ -72,7 +72,7 @@ namespace Lucene.Net.Analysis.Hunspell
                     assertEquals(1, dictionary.LookupPrefix(new char[] { 's' }, 0, 1).Length);
                     IntsRef ordList = dictionary.LookupWord(new char[] { 'o', 'l', 'r' }, 0, 3);
                     BytesRef @ref = new BytesRef();
-                    dictionary.flagLookup.Get(ordList.Ints[0], @ref);
+                    dictionary.flagLookup.Get(ordList.Int32s[0], @ref);
                     char[] flags = Dictionary.DecodeFlags(@ref);
                     assertEquals(1, flags.Length);
                 }
@@ -92,7 +92,7 @@ namespace Lucene.Net.Analysis.Hunspell
                     assertEquals(1, dictionary.LookupPrefix(new char[] { 's' }, 0, 1).Length);
                     IntsRef ordList = dictionary.LookupWord(new char[] { 'o', 'l', 'r' }, 0, 3);
                     BytesRef @ref = new BytesRef();
-                    dictionary.flagLookup.Get(ordList.Ints[0], @ref);
+                    dictionary.flagLookup.Get(ordList.Int32s[0], @ref);
                     char[] flags = Dictionary.DecodeFlags(@ref);
                     assertEquals(1, flags.Length);
                 }
@@ -111,7 +111,7 @@ namespace Lucene.Net.Analysis.Hunspell
                     assertEquals(1, dictionary.LookupPrefix(new char[] { 's' }, 0, 1).Length);
                     IntsRef ordList = dictionary.LookupWord(new char[] { 'o', 'l', 'r' }, 0, 3);
                     BytesRef @ref = new BytesRef();
-                    dictionary.flagLookup.Get(ordList.Ints[0], @ref);
+                    dictionary.flagLookup.Get(ordList.Int32s[0], @ref);
                     char[] flags = Dictionary.DecodeFlags(@ref);
                     assertEquals(1, flags.Length);
                 }


Mime
View raw message