lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [10/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:49 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
index 94e1f46..09db0fc 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSegmentInfoReader.cs
@@ -43,10 +43,10 @@ namespace Lucene.Net.Codecs.Lucene3x
     {
         public static void ReadLegacyInfos(SegmentInfos infos, Directory directory, IndexInput input, int format)
         {
-            infos.Version = input.ReadLong(); // read version
-            infos.Counter = input.ReadInt(); // read counter
+            infos.Version = input.ReadInt64(); // read version
+            infos.Counter = input.ReadInt32(); // read counter
             Lucene3xSegmentInfoReader reader = new Lucene3xSegmentInfoReader();
-            for (int i = input.ReadInt(); i > 0; i--) // read segmentInfos
+            for (int i = input.ReadInt32(); i > 0; i--) // read segmentInfos
             {
                 SegmentCommitInfo siPerCommit = reader.ReadLegacySegmentInfo(directory, format, input);
                 SegmentInfo si = siPerCommit.Info;
@@ -161,10 +161,10 @@ namespace Lucene.Net.Codecs.Lucene3x
 
             string name = input.ReadString();
 
-            int docCount = input.ReadInt();
-            long delGen = input.ReadLong();
+            int docCount = input.ReadInt32();
+            long delGen = input.ReadInt64();
 
-            int docStoreOffset = input.ReadInt();
+            int docStoreOffset = input.ReadInt32();
             IDictionary<string, string> attributes = new Dictionary<string, string>();
 
             // parse the docstore stuff and shove it into attributes
@@ -190,7 +190,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             //System.out.println("version=" + version + " name=" + name + " docCount=" + docCount + " delGen=" + delGen + " dso=" + docStoreOffset + " dss=" + docStoreSegment + " dssCFs=" + docStoreIsCompoundFile + " b=" + b + " format=" + format);
 
             Debug.Assert(1 == b, "expected 1 but was: " + b + " format: " + format);
-            int numNormGen = input.ReadInt();
+            int numNormGen = input.ReadInt32();
             IDictionary<int, long> normGen;
             if (numNormGen == SegmentInfo.NO)
             {
@@ -201,12 +201,12 @@ namespace Lucene.Net.Codecs.Lucene3x
                 normGen = new Dictionary<int, long>();
                 for (int j = 0; j < numNormGen; j++)
                 {
-                    normGen[j] = input.ReadLong();
+                    normGen[j] = input.ReadInt64();
                 }
             }
             bool isCompoundFile = input.ReadByte() == SegmentInfo.YES;
 
-            int delCount = input.ReadInt();
+            int delCount = input.ReadInt32();
             Debug.Assert(delCount <= docCount);
 
             bool hasProx = input.ReadByte() == 1;
@@ -296,7 +296,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             CodecUtil.CheckHeader(input, Lucene3xSegmentInfoFormat.UPGRADED_SI_CODEC_NAME, Lucene3xSegmentInfoFormat.UPGRADED_SI_VERSION_START, Lucene3xSegmentInfoFormat.UPGRADED_SI_VERSION_CURRENT);
             string version = input.ReadString();
 
-            int docCount = input.ReadInt();
+            int docCount = input.ReadInt32();
 
             IDictionary<string, string> attributes = input.ReadStringStringMap();
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSkipListReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSkipListReader.cs
index 328b092..baa16b3 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSkipListReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xSkipListReader.cs
@@ -119,20 +119,20 @@ namespace Lucene.Net.Codecs.Lucene3x
                 // to read the current payload length
                 // because it differs from the length of the
                 // previous payload
-                delta = skipStream.ReadVInt();
+                delta = skipStream.ReadVInt32();
                 if ((delta & 1) != 0)
                 {
-                    payloadLength[level] = skipStream.ReadVInt();
+                    payloadLength[level] = skipStream.ReadVInt32();
                 }
                 delta = (int)((uint)delta >> 1);
             }
             else
             {
-                delta = skipStream.ReadVInt();
+                delta = skipStream.ReadVInt32();
             }
 
-            freqPointer[level] += skipStream.ReadVInt();
-            proxPointer[level] += skipStream.ReadVInt();
+            freqPointer[level] += skipStream.ReadVInt32();
+            proxPointer[level] += skipStream.ReadVInt32();
 
             return delta;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
index b7cb10b..b30b083 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xStoredFieldsReader.cs
@@ -120,7 +120,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
             try
             {
-                int format = idxStream.ReadInt();
+                int format = idxStream.ReadInt32();
                 if (format < FORMAT_MINIMUM)
                 {
                     throw new IndexFormatTooOldException(idxStream, format, FORMAT_MINIMUM, FORMAT_CURRENT);
@@ -170,7 +170,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                 string indexStreamFN = IndexFileNames.SegmentFileName(segment, "", FIELDS_INDEX_EXTENSION);
                 indexStream = d.OpenInput(indexStreamFN, context);
 
-                format = indexStream.ReadInt();
+                format = indexStream.ReadInt32();
 
                 if (format < FORMAT_MINIMUM)
                 {
@@ -262,12 +262,12 @@ namespace Lucene.Net.Codecs.Lucene3x
         public override sealed void VisitDocument(int n, StoredFieldVisitor visitor)
         {
             SeekIndex(n);
-            fieldsStream.Seek(indexStream.ReadLong());
+            fieldsStream.Seek(indexStream.ReadInt64());
 
-            int numFields = fieldsStream.ReadVInt();
+            int numFields = fieldsStream.ReadVInt32();
             for (int fieldIDX = 0; fieldIDX < numFields; fieldIDX++)
             {
-                int fieldNumber = fieldsStream.ReadVInt();
+                int fieldNumber = fieldsStream.ReadVInt32();
                 FieldInfo fieldInfo = fieldInfos.FieldInfo(fieldNumber);
 
                 int bits = fieldsStream.ReadByte() & 0xFF;
@@ -297,19 +297,19 @@ namespace Lucene.Net.Codecs.Lucene3x
                 switch (numeric)
                 {
                     case FIELD_IS_NUMERIC_INT:
-                        visitor.Int32Field(info, fieldsStream.ReadInt());
+                        visitor.Int32Field(info, fieldsStream.ReadInt32());
                         return;
 
                     case FIELD_IS_NUMERIC_LONG:
-                        visitor.Int64Field(info, fieldsStream.ReadLong());
+                        visitor.Int64Field(info, fieldsStream.ReadInt64());
                         return;
 
                     case FIELD_IS_NUMERIC_FLOAT:
-                        visitor.SingleField(info, Number.IntBitsToFloat(fieldsStream.ReadInt()));
+                        visitor.SingleField(info, Number.Int32BitsToSingle(fieldsStream.ReadInt32()));
                         return;
 
                     case FIELD_IS_NUMERIC_DOUBLE:
-                        visitor.DoubleField(info, BitConverter.Int64BitsToDouble(fieldsStream.ReadLong()));
+                        visitor.DoubleField(info, BitConverter.Int64BitsToDouble(fieldsStream.ReadInt64()));
                         return;
 
                     default:
@@ -318,7 +318,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             else
             {
-                int length = fieldsStream.ReadVInt();
+                int length = fieldsStream.ReadVInt32();
                 var bytes = new byte[length];
                 fieldsStream.ReadBytes(bytes, 0, length);
                 if ((bits & FIELD_IS_BINARY) != 0)
@@ -341,12 +341,12 @@ namespace Lucene.Net.Codecs.Lucene3x
                 {
                     case FIELD_IS_NUMERIC_INT:
                     case FIELD_IS_NUMERIC_FLOAT:
-                        fieldsStream.ReadInt();
+                        fieldsStream.ReadInt32();
                         return;
 
                     case FIELD_IS_NUMERIC_LONG:
                     case FIELD_IS_NUMERIC_DOUBLE:
-                        fieldsStream.ReadLong();
+                        fieldsStream.ReadInt64();
                         return;
 
                     default:
@@ -355,7 +355,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             else
             {
-                int length = fieldsStream.ReadVInt();
+                int length = fieldsStream.ReadVInt32();
                 fieldsStream.Seek(fieldsStream.FilePointer + length);
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
index 75331bb..86f8692 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/Lucene3xTermVectorsReader.cs
@@ -190,7 +190,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         private int CheckValidFormat(IndexInput @in)
         {
-            int format = @in.ReadInt();
+            int format = @in.ReadInt32();
             if (format < FORMAT_MINIMUM)
             {
                 throw new IndexFormatTooOldException(@in, format, FORMAT_MINIMUM, FORMAT_CURRENT);
@@ -228,9 +228,9 @@ namespace Lucene.Net.Codecs.Lucene3x
             {
                 this.outerInstance = outerInstance;
                 outerInstance.SeekTvx(docID);
-                outerInstance.tvd.Seek(outerInstance.tvx.ReadLong());
+                outerInstance.tvd.Seek(outerInstance.tvx.ReadInt64());
 
-                int fieldCount = outerInstance.tvd.ReadVInt();
+                int fieldCount = outerInstance.tvd.ReadVInt32();
                 Debug.Assert(fieldCount >= 0);
                 if (fieldCount != 0)
                 {
@@ -238,16 +238,16 @@ namespace Lucene.Net.Codecs.Lucene3x
                     fieldFPs = new long[fieldCount];
                     for (int fieldUpto = 0; fieldUpto < fieldCount; fieldUpto++)
                     {
-                        int fieldNumber = outerInstance.tvd.ReadVInt();
+                        int fieldNumber = outerInstance.tvd.ReadVInt32();
                         fieldNumbers[fieldUpto] = fieldNumber;
                         fieldNumberToIndex[fieldNumber] = fieldUpto;
                     }
 
-                    long position = outerInstance.tvx.ReadLong();
+                    long position = outerInstance.tvx.ReadInt64();
                     fieldFPs[0] = position;
                     for (int fieldUpto = 1; fieldUpto < fieldCount; fieldUpto++)
                     {
-                        position += outerInstance.tvd.ReadVLong();
+                        position += outerInstance.tvd.ReadVInt64();
                         fieldFPs[fieldUpto] = position;
                     }
                 }
@@ -364,7 +364,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             {
                 this.outerInstance = outerInstance;
                 outerInstance.tvf.Seek(tvfFP);
-                numTerms = outerInstance.tvf.ReadVInt();
+                numTerms = outerInstance.tvf.ReadVInt32();
                 byte bits = outerInstance.tvf.ReadByte();
                 storePositions = (bits & STORE_POSITIONS_WITH_TERMVECTOR) != 0;
                 storeOffsets = (bits & STORE_OFFSET_WITH_TERMVECTOR) != 0;
@@ -532,13 +532,13 @@ namespace Lucene.Net.Codecs.Lucene3x
                     TermAndPostings t = new TermAndPostings();
                     BytesRef term = new BytesRef();
                     term.CopyBytes(lastTerm);
-                    int start = tvf.ReadVInt();
-                    int deltaLen = tvf.ReadVInt();
+                    int start = tvf.ReadVInt32();
+                    int deltaLen = tvf.ReadVInt32();
                     term.Length = start + deltaLen;
                     term.Grow(term.Length);
                     tvf.ReadBytes(term.Bytes, start, deltaLen);
                     t.Term = term;
-                    int freq = tvf.ReadVInt();
+                    int freq = tvf.ReadVInt32();
                     t.Freq = freq;
 
                     if (storePositions)
@@ -547,7 +547,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                         int pos = 0;
                         for (int posUpto = 0; posUpto < freq; posUpto++)
                         {
-                            int delta = tvf.ReadVInt();
+                            int delta = tvf.ReadVInt32();
                             if (delta == -1)
                             {
                                 delta = 0; // LUCENE-1542 correction
@@ -565,8 +565,8 @@ namespace Lucene.Net.Codecs.Lucene3x
                         int offset = 0;
                         for (int posUpto = 0; posUpto < freq; posUpto++)
                         {
-                            startOffsets[posUpto] = offset + tvf.ReadVInt();
-                            offset = endOffsets[posUpto] = startOffsets[posUpto] + tvf.ReadVInt();
+                            startOffsets[posUpto] = offset + tvf.ReadVInt32();
+                            offset = endOffsets[posUpto] = startOffsets[posUpto] + tvf.ReadVInt32();
                         }
                         t.StartOffsets = startOffsets;
                         t.EndOffsets = endOffsets;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermDocs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermDocs.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermDocs.cs
index 348ca04..ae409c3 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermDocs.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermDocs.cs
@@ -165,7 +165,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                 {
                     return false;
                 }
-                int docCode = m_freqStream.ReadVInt();
+                int docCode = m_freqStream.ReadVInt32();
 
                 if (m_indexOptions == IndexOptions.DOCS_ONLY)
                 {
@@ -180,7 +180,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     }
                     else
                     {
-                        freq = m_freqStream.ReadVInt(); // else read freq
+                        freq = m_freqStream.ReadVInt32(); // else read freq
                         Debug.Assert(freq != 1);
                     }
                 }
@@ -211,7 +211,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                 while (i < length && m_count < m_df)
                 {
                     // manually inlined call to next() for speed
-                    int docCode = m_freqStream.ReadVInt();
+                    int docCode = m_freqStream.ReadVInt32();
                     doc += (int)((uint)docCode >> 1); // shift off low bit
                     if ((docCode & 1) != 0) // if low bit is set
                     {
@@ -219,7 +219,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                     }
                     else
                     {
-                        freq = m_freqStream.ReadVInt(); // else read freq
+                        freq = m_freqStream.ReadVInt32(); // else read freq
                     }
                     m_count++;
 
@@ -240,7 +240,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             while (i < length && m_count < m_df)
             {
                 // manually inlined call to next() for speed
-                doc += m_freqStream.ReadVInt();
+                doc += m_freqStream.ReadVInt32();
                 m_count++;
 
                 if (m_liveDocs == null || m_liveDocs.Get(doc))

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermEnum.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermEnum.cs
index 720c216..68d5a73 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermEnum.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermEnum.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             isIndex = isi;
             maxSkipLevels = 1; // use single-level skip lists for formats > -3
 
-            int firstInt = input.ReadInt();
+            int firstInt = input.ReadInt32();
             if (firstInt >= 0)
             {
                 // original-format file, without explicit format version number
@@ -97,11 +97,11 @@ namespace Lucene.Net.Codecs.Lucene3x
                     throw new IndexFormatTooNewException(input, format, FORMAT_MINIMUM, FORMAT_CURRENT);
                 }
 
-                size = input.ReadLong(); // read the size
+                size = input.ReadInt64(); // read the size
 
-                indexInterval = input.ReadInt();
-                skipInterval = input.ReadInt();
-                maxSkipLevels = input.ReadInt();
+                indexInterval = input.ReadInt32();
+                skipInterval = input.ReadInt32();
+                maxSkipLevels = input.ReadInt32();
                 Debug.Assert(indexInterval > 0, "indexInterval=" + indexInterval + " is negative; must be > 0");
                 Debug.Assert(skipInterval > 0, "skipInterval=" + skipInterval + " is negative; must be > 0");
             }
@@ -158,18 +158,18 @@ namespace Lucene.Net.Codecs.Lucene3x
             termBuffer.Read(input, fieldInfos);
             newSuffixStart = termBuffer.newSuffixStart;
 
-            termInfo.DocFreq = input.ReadVInt(); // read doc freq
-            termInfo.FreqPointer += input.ReadVLong(); // read freq pointer
-            termInfo.ProxPointer += input.ReadVLong(); // read prox pointer
+            termInfo.DocFreq = input.ReadVInt32(); // read doc freq
+            termInfo.FreqPointer += input.ReadVInt64(); // read freq pointer
+            termInfo.ProxPointer += input.ReadVInt64(); // read prox pointer
 
             if (termInfo.DocFreq >= skipInterval)
             {
-                termInfo.SkipOffset = input.ReadVInt();
+                termInfo.SkipOffset = input.ReadVInt32();
             }
 
             if (isIndex)
             {
-                indexPointer += input.ReadVLong(); // read index pointer
+                indexPointer += input.ReadVInt64(); // read index pointer
             }
 
             //System.out.println("  ste ret term=" + term());

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermPositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermPositions.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermPositions.cs
index 95893dc..97fc5b2 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermPositions.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/SegmentTermPositions.cs
@@ -107,7 +107,7 @@ namespace Lucene.Net.Codecs.Lucene3x
 
         private int ReadDeltaPosition()
         {
-            int delta = proxStream.ReadVInt();
+            int delta = proxStream.ReadVInt32();
             if (m_currentFieldStoresPayloads)
             {
                 // if the current field stores payloads then
@@ -116,7 +116,7 @@ namespace Lucene.Net.Codecs.Lucene3x
                 // payload length
                 if ((delta & 1) != 0)
                 {
-                    payloadLength = proxStream.ReadVInt();
+                    payloadLength = proxStream.ReadVInt32();
                 }
                 delta = (int)((uint)delta >> 1);
                 needToLoadPayload = true;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
index d7dc011..79744f2 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/TermBuffer.cs
@@ -62,8 +62,8 @@ namespace Lucene.Net.Codecs.Lucene3x
         public void Read(IndexInput input, FieldInfos fieldInfos)
         {
             this.term = null; // invalidate cache
-            newSuffixStart = input.ReadVInt();
-            int length = input.ReadVInt();
+            newSuffixStart = input.ReadVInt32();
+            int length = input.ReadVInt32();
             int totalLength = newSuffixStart + length;
             Debug.Assert(totalLength <= ByteBlockPool.BYTE_BLOCK_SIZE - 2, "termLength=" + totalLength + ",resource=" + input);
             if (bytes.Bytes.Length < totalLength)
@@ -72,7 +72,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             }
             bytes.Length = totalLength;
             input.ReadBytes(bytes.Bytes, newSuffixStart, length);
-            int fieldNumber = input.ReadVInt();
+            int fieldNumber = input.ReadVInt32();
             if (fieldNumber != currentFieldNumber)
             {
                 currentFieldNumber = fieldNumber;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
index f322684..f726eec 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene3x/TermInfosReaderIndex.cs
@@ -89,16 +89,16 @@ namespace Lucene.Net.Codecs.Lucene3x
                 }
                 TermInfo termInfo = indexEnum.TermInfo();
                 indexToTerms.Set(i, dataOutput.Position);
-                dataOutput.WriteVInt(fieldCounter);
+                dataOutput.WriteVInt32(fieldCounter);
                 dataOutput.WriteString(term.Text());
-                dataOutput.WriteVInt(termInfo.DocFreq);
+                dataOutput.WriteVInt32(termInfo.DocFreq);
                 if (termInfo.DocFreq >= skipInterval)
                 {
-                    dataOutput.WriteVInt(termInfo.SkipOffset);
+                    dataOutput.WriteVInt32(termInfo.SkipOffset);
                 }
-                dataOutput.WriteVLong(termInfo.FreqPointer);
-                dataOutput.WriteVLong(termInfo.ProxPointer);
-                dataOutput.WriteVLong(indexEnum.indexPointer);
+                dataOutput.WriteVInt64(termInfo.FreqPointer);
+                dataOutput.WriteVInt64(termInfo.ProxPointer);
+                dataOutput.WriteVInt64(indexEnum.indexPointer);
                 for (int j = 1; j < indexDivisor; j++)
                 {
                     if (!indexEnum.Next())
@@ -133,25 +133,25 @@ namespace Lucene.Net.Codecs.Lucene3x
             input.SetPosition(indexToDataOffset.Get(indexOffset));
 
             // read the term
-            int fieldId = input.ReadVInt();
+            int fieldId = input.ReadVInt32();
             Term field = fields[fieldId];
             Term term = new Term(field.Field, input.ReadString());
 
             // read the terminfo
             var termInfo = new TermInfo();
-            termInfo.DocFreq = input.ReadVInt();
+            termInfo.DocFreq = input.ReadVInt32();
             if (termInfo.DocFreq >= skipInterval)
             {
-                termInfo.SkipOffset = input.ReadVInt();
+                termInfo.SkipOffset = input.ReadVInt32();
             }
             else
             {
                 termInfo.SkipOffset = 0;
             }
-            termInfo.FreqPointer = input.ReadVLong();
-            termInfo.ProxPointer = input.ReadVLong();
+            termInfo.FreqPointer = input.ReadVInt64();
+            termInfo.ProxPointer = input.ReadVInt64();
 
-            long pointer = input.ReadVLong();
+            long pointer = input.ReadVInt64();
 
             // perform the seek
             enumerator.Seek(pointer, ((long)indexOffset * totalIndexInterval) - 1, term, termInfo);
@@ -202,7 +202,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             input.SetPosition(indexToDataOffset.Get(termIndex));
 
             // read the term
-            int fieldId = input.ReadVInt();
+            int fieldId = input.ReadVInt32();
             Term field = fields[fieldId];
             return new Term(field.Field, input.ReadString());
         }
@@ -250,7 +250,7 @@ namespace Lucene.Net.Codecs.Lucene3x
             int c = CompareField(term, termIndex, input);
             if (c == 0)
             {
-                reuse.Length = input.ReadVInt();
+                reuse.Length = input.ReadVInt32();
                 reuse.Grow(reuse.Length);
                 input.ReadBytes(reuse.Bytes, 0, reuse.Length);
                 return comparer.Compare(term.Bytes, reuse);
@@ -272,7 +272,7 @@ namespace Lucene.Net.Codecs.Lucene3x
         private int CompareField(Term term, int termIndex, PagedBytesDataInput input)
         {
             input.SetPosition(indexToDataOffset.Get(termIndex));
-            return System.String.Compare(term.Field, fields[input.ReadVInt()].Field, System.StringComparison.Ordinal);
+            return System.String.Compare(term.Field, fields[input.ReadVInt32()].Field, System.StringComparison.Ordinal);
         }
 
         internal virtual long RamBytesUsed()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/BitVector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/BitVector.cs b/src/Lucene.Net.Core/Codecs/Lucene40/BitVector.cs
index 7a468e4..39af20a 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/BitVector.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/BitVector.cs
@@ -267,7 +267,7 @@ namespace Lucene.Net.Codecs.Lucene40
             IndexOutput output = d.CreateOutput(name, context);
             try
             {
-                output.WriteInt(-2);
+                output.WriteInt32(-2);
                 CodecUtil.WriteHeader(output, CODEC, VERSION_CURRENT);
                 if (IsSparse)
                 {
@@ -333,8 +333,8 @@ namespace Lucene.Net.Codecs.Lucene40
         /// Write as a bit set </summary>
         private void WriteBits(IndexOutput output)
         {
-            output.WriteInt(Length); // write size
-            output.WriteInt(Count()); // write count
+            output.WriteInt32(Length); // write size
+            output.WriteInt32(Count()); // write count
             output.WriteBytes(bits, bits.Length);
         }
 
@@ -342,16 +342,16 @@ namespace Lucene.Net.Codecs.Lucene40
         /// Write as a d-gaps list </summary>
         private void WriteClearedDgaps(IndexOutput output)
         {
-            output.WriteInt(-1); // mark using d-gaps
-            output.WriteInt(Length); // write size
-            output.WriteInt(Count()); // write count
+            output.WriteInt32(-1); // mark using d-gaps
+            output.WriteInt32(Length); // write size
+            output.WriteInt32(Count()); // write count
             int last = 0;
             int numCleared = Length - Count();
             for (int i = 0; i < bits.Length && numCleared > 0; i++)
             {
                 if (bits[i] != unchecked((byte)0xff))
                 {
-                    output.WriteVInt(i - last);
+                    output.WriteVInt32(i - last);
                     output.WriteByte(bits[i]);
                     last = i;
                     numCleared -= (8 - BitUtil.BitCount(bits[i]));
@@ -420,13 +420,13 @@ namespace Lucene.Net.Codecs.Lucene40
 
             try
             {
-                int firstInt = input.ReadInt();
+                int firstInt = input.ReadInt32();
 
                 if (firstInt == -2)
                 {
                     // New format, with full header & version:
                     version = CodecUtil.CheckHeader(input, CODEC, VERSION_START, VERSION_CURRENT);
-                    size = input.ReadInt();
+                    size = input.ReadInt32();
                 }
                 else
                 {
@@ -486,7 +486,7 @@ namespace Lucene.Net.Codecs.Lucene40
         /// Read as a bit set </summary>
         private void ReadBits(IndexInput input)
         {
-            count = input.ReadInt(); // read count
+            count = input.ReadInt32(); // read count
             bits = new byte[GetNumBytes(size)]; // allocate bits
             input.ReadBytes(bits, 0, bits.Length);
         }
@@ -495,14 +495,14 @@ namespace Lucene.Net.Codecs.Lucene40
         /// read as a d-gaps list </summary>
         private void ReadSetDgaps(IndexInput input)
         {
-            size = input.ReadInt(); // (re)read size
-            count = input.ReadInt(); // read count
+            size = input.ReadInt32(); // (re)read size
+            count = input.ReadInt32(); // read count
             bits = new byte[GetNumBytes(size)]; // allocate bits
             int last = 0;
             int n = Count();
             while (n > 0)
             {
-                last += input.ReadVInt();
+                last += input.ReadVInt32();
                 bits[last] = input.ReadByte();
                 n -= BitUtil.BitCount(bits[last]);
                 Debug.Assert(n >= 0);
@@ -513,8 +513,8 @@ namespace Lucene.Net.Codecs.Lucene40
         /// read as a d-gaps cleared bits list </summary>
         private void ReadClearedDgaps(IndexInput input)
         {
-            size = input.ReadInt(); // (re)read size
-            count = input.ReadInt(); // read count
+            size = input.ReadInt32(); // (re)read size
+            count = input.ReadInt32(); // read count
             bits = new byte[GetNumBytes(size)]; // allocate bits
             for (int i = 0; i < bits.Length; ++i)
             {
@@ -525,7 +525,7 @@ namespace Lucene.Net.Codecs.Lucene40
             int numCleared = Length - Count();
             while (numCleared > 0)
             {
-                last += input.ReadVInt();
+                last += input.ReadVInt32();
                 bits[last] = input.ReadByte();
                 numCleared -= 8 - BitUtil.BitCount(bits[last]);
                 Debug.Assert(numCleared >= 0 || (last == (bits.Length - 1) && numCleared == -(8 - (size & 7))));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40DocValuesReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40DocValuesReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40DocValuesReader.cs
index e9039f5..7f53820 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40DocValuesReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40DocValuesReader.cs
@@ -86,7 +86,7 @@ namespace Lucene.Net.Codecs.Lucene40
                         //{
                         if (type == LegacyDocValuesType.VAR_INTS)
                         {
-                            instance = LoadVarIntsField(field, input);
+                            instance = LoadVarInt32sField(field, input);
                         }
                         else if (type == LegacyDocValuesType.FIXED_INTS_8)
                         {
@@ -94,19 +94,19 @@ namespace Lucene.Net.Codecs.Lucene40
                         }
                         else if (type == LegacyDocValuesType.FIXED_INTS_16)
                         {
-                            instance = LoadShortField(field, input);
+                            instance = LoadInt16Field(field, input);
                         }
                         else if (type == LegacyDocValuesType.FIXED_INTS_32)
                         {
-                            instance = LoadIntField(field, input);
+                            instance = LoadInt32Field(field, input);
                         }
                         else if (type == LegacyDocValuesType.FIXED_INTS_64)
                         {
-                            instance = LoadLongField(field, input);
+                            instance = LoadInt64Field(field, input);
                         }
                         else if (type == LegacyDocValuesType.FLOAT_32)
                         {
-                            instance = LoadFloatField(field, input);
+                            instance = LoadSingleField(field, input);
                         }
                         else if (type == LegacyDocValuesType.FLOAT_64)
                         {
@@ -137,7 +137,10 @@ namespace Lucene.Net.Codecs.Lucene40
             }
         }
 
-        private NumericDocValues LoadVarIntsField(FieldInfo field, IndexInput input)
+        /// <summary>
+        /// NOTE: This was loadVarIntsField() in Lucene
+        /// </summary>
+        private NumericDocValues LoadVarInt32sField(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.VAR_INTS_CODEC_NAME, Lucene40DocValuesFormat.VAR_INTS_VERSION_START, Lucene40DocValuesFormat.VAR_INTS_VERSION_CURRENT);
             var header = (sbyte)input.ReadByte();
@@ -147,15 +150,15 @@ namespace Lucene.Net.Codecs.Lucene40
                 var values = new long[maxDoc];
                 for (int i = 0; i < values.Length; i++)
                 {
-                    values[i] = input.ReadLong();
+                    values[i] = input.ReadInt64();
                 }
                 ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
                 return new NumericDocValuesAnonymousInnerClassHelper(values);
             }
             else if (header == Lucene40DocValuesFormat.VAR_INTS_PACKED)
             {
-                long minValue = input.ReadLong();
-                long defaultValue = input.ReadLong();
+                long minValue = input.ReadInt64();
+                long defaultValue = input.ReadInt64();
                 PackedInts.Reader reader = PackedInts.GetReader(input);
                 ramBytesUsed.AddAndGet(reader.RamBytesUsed());
                 return new NumericDocValuesAnonymousInnerClassHelper2(minValue, defaultValue, reader);
@@ -211,7 +214,7 @@ namespace Lucene.Net.Codecs.Lucene40
         private NumericDocValues LoadByteField(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_START, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 1)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -238,10 +241,13 @@ namespace Lucene.Net.Codecs.Lucene40
             }
         }
 
-        private NumericDocValues LoadShortField(FieldInfo field, IndexInput input)
+        /// <summary>
+        /// NOTE: This was loadShortField() in Lucene
+        /// </summary>
+        private NumericDocValues LoadInt16Field(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_START, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 2)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -250,7 +256,7 @@ namespace Lucene.Net.Codecs.Lucene40
             short[] values = new short[maxDoc];
             for (int i = 0; i < values.Length; i++)
             {
-                values[i] = input.ReadShort();
+                values[i] = input.ReadInt16();
             }
             ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
             return new NumericDocValuesAnonymousInnerClassHelper4(values);
@@ -271,10 +277,13 @@ namespace Lucene.Net.Codecs.Lucene40
             }
         }
 
-        private NumericDocValues LoadIntField(FieldInfo field, IndexInput input)
+        /// <summary>
+        /// NOTE: This was loadIntField() in Lucene
+        /// </summary>
+        private NumericDocValues LoadInt32Field(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_START, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 4)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -283,7 +292,7 @@ namespace Lucene.Net.Codecs.Lucene40
             var values = new int[maxDoc];
             for (int i = 0; i < values.Length; i++)
             {
-                values[i] = input.ReadInt();
+                values[i] = input.ReadInt32();
             }
             ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
             return new NumericDocValuesAnonymousInnerClassHelper5(values);
@@ -304,10 +313,13 @@ namespace Lucene.Net.Codecs.Lucene40
             }
         }
 
-        private NumericDocValues LoadLongField(FieldInfo field, IndexInput input)
+        /// <summary>
+        /// NOTE: This was loadLongField() in Lucene
+        /// </summary>
+        private NumericDocValues LoadInt64Field(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.INTS_CODEC_NAME, Lucene40DocValuesFormat.INTS_VERSION_START, Lucene40DocValuesFormat.INTS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 8)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -316,7 +328,7 @@ namespace Lucene.Net.Codecs.Lucene40
             long[] values = new long[maxDoc];
             for (int i = 0; i < values.Length; i++)
             {
-                values[i] = input.ReadLong();
+                values[i] = input.ReadInt64();
             }
             ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
             return new NumericDocValuesAnonymousInnerClassHelper6(values);
@@ -337,10 +349,13 @@ namespace Lucene.Net.Codecs.Lucene40
             }
         }
 
-        private NumericDocValues LoadFloatField(FieldInfo field, IndexInput input)
+        /// <summary>
+        /// NOTE: This was loadFloatField() in Lucene
+        /// </summary>
+        private NumericDocValues LoadSingleField(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.FLOATS_CODEC_NAME, Lucene40DocValuesFormat.FLOATS_VERSION_START, Lucene40DocValuesFormat.FLOATS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 4)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -349,7 +364,7 @@ namespace Lucene.Net.Codecs.Lucene40
             int[] values = new int[maxDoc];
             for (int i = 0; i < values.Length; i++)
             {
-                values[i] = input.ReadInt();
+                values[i] = input.ReadInt32();
             }
             ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
             return new NumericDocValuesAnonymousInnerClassHelper7(values);
@@ -373,7 +388,7 @@ namespace Lucene.Net.Codecs.Lucene40
         private NumericDocValues LoadDoubleField(FieldInfo field, IndexInput input)
         {
             CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.FLOATS_CODEC_NAME, Lucene40DocValuesFormat.FLOATS_VERSION_START, Lucene40DocValuesFormat.FLOATS_VERSION_CURRENT);
-            int valueSize = input.ReadInt();
+            int valueSize = input.ReadInt32();
             if (valueSize != 8)
             {
                 throw new CorruptIndexException("invalid valueSize: " + valueSize);
@@ -382,7 +397,7 @@ namespace Lucene.Net.Codecs.Lucene40
             long[] values = new long[maxDoc];
             for (int i = 0; i < values.Length; i++)
             {
-                values[i] = input.ReadLong();
+                values[i] = input.ReadInt64();
             }
             ramBytesUsed.AddAndGet(RamUsageEstimator.SizeOf(values));
             return new NumericDocValuesAnonymousInnerClassHelper8(values);
@@ -446,7 +461,7 @@ namespace Lucene.Net.Codecs.Lucene40
             try
             {
                 CodecUtil.CheckHeader(input, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_CODEC_NAME, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_VERSION_START, Lucene40DocValuesFormat.BYTES_FIXED_STRAIGHT_VERSION_CURRENT);
-                int fixedLength = input.ReadInt();
+                int fixedLength = input.ReadInt32();
                 var bytes = new PagedBytes(16);
                 bytes.Copy(input, fixedLength * (long)state.SegmentInfo.DocCount);
                 PagedBytes.Reader bytesReader = bytes.Freeze(true);
@@ -498,7 +513,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 CodecUtil.CheckHeader(data, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_CODEC_NAME_DAT, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_VERSION_START, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_VERSION_CURRENT);
                 index = dir.OpenInput(indexName, state.Context);
                 CodecUtil.CheckHeader(index, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_CODEC_NAME_IDX, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_VERSION_START, Lucene40DocValuesFormat.BYTES_VAR_STRAIGHT_VERSION_CURRENT);
-                long totalBytes = index.ReadVLong();
+                long totalBytes = index.ReadVInt64();
                 PagedBytes bytes = new PagedBytes(16);
                 bytes.Copy(data, totalBytes);
                 PagedBytes.Reader bytesReader = bytes.Freeze(true);
@@ -555,8 +570,8 @@ namespace Lucene.Net.Codecs.Lucene40
                 index = dir.OpenInput(indexName, state.Context);
                 CodecUtil.CheckHeader(index, Lucene40DocValuesFormat.BYTES_FIXED_DEREF_CODEC_NAME_IDX, Lucene40DocValuesFormat.BYTES_FIXED_DEREF_VERSION_START, Lucene40DocValuesFormat.BYTES_FIXED_DEREF_VERSION_CURRENT);
 
-                int fixedLength = data.ReadInt();
-                int valueCount = index.ReadInt();
+                int fixedLength = data.ReadInt32();
+                int valueCount = index.ReadInt32();
                 PagedBytes bytes = new PagedBytes(16);
                 bytes.Copy(data, fixedLength * (long)valueCount);
                 PagedBytes.Reader bytesReader = bytes.Freeze(true);
@@ -614,7 +629,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 index = dir.OpenInput(indexName, state.Context);
                 CodecUtil.CheckHeader(index, Lucene40DocValuesFormat.BYTES_VAR_DEREF_CODEC_NAME_IDX, Lucene40DocValuesFormat.BYTES_VAR_DEREF_VERSION_START, Lucene40DocValuesFormat.BYTES_VAR_DEREF_VERSION_CURRENT);
 
-                long totalBytes = index.ReadLong();
+                long totalBytes = index.ReadInt64();
                 PagedBytes bytes = new PagedBytes(16);
                 bytes.Copy(data, totalBytes);
                 PagedBytes.Reader bytesReader = bytes.Freeze(true);
@@ -727,8 +742,8 @@ namespace Lucene.Net.Codecs.Lucene40
             CodecUtil.CheckHeader(data, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_CODEC_NAME_DAT, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_VERSION_START, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_VERSION_CURRENT);
             CodecUtil.CheckHeader(index, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_CODEC_NAME_IDX, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_VERSION_START, Lucene40DocValuesFormat.BYTES_FIXED_SORTED_VERSION_CURRENT);
 
-            int fixedLength = data.ReadInt();
-            int valueCount = index.ReadInt();
+            int fixedLength = data.ReadInt32();
+            int valueCount = index.ReadInt32();
 
             PagedBytes bytes = new PagedBytes(16);
             bytes.Copy(data, fixedLength * (long)valueCount);
@@ -778,7 +793,7 @@ namespace Lucene.Net.Codecs.Lucene40
             CodecUtil.CheckHeader(data, Lucene40DocValuesFormat.BYTES_VAR_SORTED_CODEC_NAME_DAT, Lucene40DocValuesFormat.BYTES_VAR_SORTED_VERSION_START, Lucene40DocValuesFormat.BYTES_VAR_SORTED_VERSION_CURRENT);
             CodecUtil.CheckHeader(index, Lucene40DocValuesFormat.BYTES_VAR_SORTED_CODEC_NAME_IDX, Lucene40DocValuesFormat.BYTES_VAR_SORTED_VERSION_START, Lucene40DocValuesFormat.BYTES_VAR_SORTED_VERSION_CURRENT);
 
-            long maxAddress = index.ReadLong();
+            long maxAddress = index.ReadInt64();
             PagedBytes bytes = new PagedBytes(16);
             bytes.Copy(data, maxAddress);
             PagedBytes.Reader bytesReader = bytes.Freeze(true);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
index d6c529e..20fb09d 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40FieldInfosReader.cs
@@ -57,13 +57,13 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 CodecUtil.CheckHeader(input, Lucene40FieldInfosFormat.CODEC_NAME, Lucene40FieldInfosFormat.FORMAT_START, Lucene40FieldInfosFormat.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 = input.ReadVInt();
+                    int fieldNumber = input.ReadVInt32();
                     byte bits = input.ReadByte();
                     bool isIndexed = (bits & Lucene40FieldInfosFormat.IS_INDEXED) != 0;
                     bool storeTermVector = (bits & Lucene40FieldInfosFormat.STORE_TERMVECTOR) != 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40PostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40PostingsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40PostingsReader.cs
index abb8876..2c2ffca 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40PostingsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40PostingsReader.cs
@@ -114,9 +114,9 @@ namespace Lucene.Net.Codecs.Lucene40
             // Make sure we are talking to the matching past writer
             CodecUtil.CheckHeader(termsIn, TERMS_CODEC, VERSION_START, VERSION_CURRENT);
 
-            skipInterval = termsIn.ReadInt();
-            maxSkipLevels = termsIn.ReadInt();
-            skipMinimum = termsIn.ReadInt();
+            skipInterval = termsIn.ReadInt32();
+            maxSkipLevels = termsIn.ReadInt32();
+            skipMinimum = termsIn.ReadInt32();
         }
 
         // Must keep final because we do non-standard clone
@@ -185,7 +185,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 termState2.proxOffset = 0;
             }
 
-            termState2.freqOffset += @in.ReadVLong();
+            termState2.freqOffset += @in.ReadVInt64();
             /*
             if (DEBUG) {
               System.out.println("  dF=" + termState2.docFreq);
@@ -196,7 +196,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             if (termState2.DocFreq >= skipMinimum)
             {
-                termState2.skipOffset = @in.ReadVLong();
+                termState2.skipOffset = @in.ReadVInt64();
                 // if (DEBUG) System.out.println("  skipOffset=" + termState2.skipOffset + " vs freqIn.length=" + freqIn.length());
                 Debug.Assert(termState2.freqOffset + termState2.skipOffset < freqIn.Length);
             }
@@ -207,7 +207,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             if (fieldInfo.IndexOptions >= IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
             {
-                termState2.proxOffset += @in.ReadVLong();
+                termState2.proxOffset += @in.ReadVInt64();
                 // if (DEBUG) System.out.println("  proxFP=" + termState2.proxOffset);
             }
         }
@@ -435,7 +435,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 }
                 else
                 {
-                    return freqIn.ReadVInt(); // else read freq
+                    return freqIn.ReadVInt32(); // else read freq
                 }
             }
 
@@ -475,7 +475,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 int docAc = m_accum;
                 for (int i = 0; i < size; i++)
                 {
-                    docAc += freqIn.ReadVInt();
+                    docAc += freqIn.ReadVInt32();
                     docs[i] = docAc;
                 }
                 m_accum = docAc;
@@ -490,7 +490,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 int docAc = m_accum;
                 for (int i = 0; i < size; i++)
                 {
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
                     docAc += (int)((uint)code >> 1); // shift off low bit
                     freqs[i] = ReadFreq(freqIn, code);
                     docs[i] = docAc;
@@ -590,7 +590,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 int loopLimit = m_limit;
                 for (int i = m_ord; i < loopLimit; i++)
                 {
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
                     if (omitTF)
                     {
                         docAcc += code;
@@ -617,7 +617,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 if (m_ord++ < m_limit)
                 {
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
                     if (m_indexOmitsTF)
                     {
                         m_accum += code;
@@ -692,7 +692,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 IBits liveDocs = this.m_liveDocs;
                 for (int i = m_ord; i < loopLimit; i++)
                 {
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
                     if (omitTF)
                     {
                         docAcc += code;
@@ -725,7 +725,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 IBits liveDocs = this.m_liveDocs;
                 for (int i = m_ord; i < loopLimit; i++)
                 {
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
                     if (omitTF)
                     {
                         docAcc += code;
@@ -832,7 +832,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     ord++;
 
                     // Decode next doc/freq pair
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
 
                     accum += (int)((uint)code >> 1); // shift off low bit
                     if ((code & 1) != 0) // if low bit is set
@@ -841,7 +841,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     }
                     else
                     {
-                        freq = freqIn.ReadVInt(); // else read freq
+                        freq = freqIn.ReadVInt32(); // else read freq
                     }
                     posPendingCount += freq;
 
@@ -937,7 +937,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     }
                 }
 
-                position += proxIn.ReadVInt();
+                position += proxIn.ReadVInt32();
 
                 posPendingCount--;
 
@@ -1068,7 +1068,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     ord++;
 
                     // Decode next doc/freq pair
-                    int code = freqIn.ReadVInt();
+                    int code = freqIn.ReadVInt32();
 
                     accum += (int)((uint)code >> 1); // shift off low bit
                     if ((code & 1) != 0) // if low bit is set
@@ -1077,7 +1077,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     }
                     else
                     {
-                        freq = freqIn.ReadVInt(); // else read freq
+                        freq = freqIn.ReadVInt32(); // else read freq
                     }
                     posPendingCount += freq;
 
@@ -1175,14 +1175,14 @@ namespace Lucene.Net.Codecs.Lucene40
                 // scan over any docs that were iterated without their positions
                 while (posPendingCount > freq)
                 {
-                    int code = proxIn.ReadVInt();
+                    int code = proxIn.ReadVInt32();
 
                     if (storePayloads)
                     {
                         if ((code & 1) != 0)
                         {
                             // new payload length
-                            payloadLength = proxIn.ReadVInt();
+                            payloadLength = proxIn.ReadVInt32();
                             Debug.Assert(payloadLength >= 0);
                         }
                         Debug.Assert(payloadLength != -1);
@@ -1190,10 +1190,10 @@ namespace Lucene.Net.Codecs.Lucene40
 
                     if (storeOffsets)
                     {
-                        if ((proxIn.ReadVInt() & 1) != 0)
+                        if ((proxIn.ReadVInt32() & 1) != 0)
                         {
                             // new offset length
-                            offsetLength = proxIn.ReadVInt();
+                            offsetLength = proxIn.ReadVInt32();
                         }
                     }
 
@@ -1216,13 +1216,13 @@ namespace Lucene.Net.Codecs.Lucene40
                     proxIn.Seek(proxIn.FilePointer + payloadLength);
                 }
 
-                int code_ = proxIn.ReadVInt();
+                int code_ = proxIn.ReadVInt32();
                 if (storePayloads)
                 {
                     if ((code_ & 1) != 0)
                     {
                         // new payload length
-                        payloadLength = proxIn.ReadVInt();
+                        payloadLength = proxIn.ReadVInt32();
                         Debug.Assert(payloadLength >= 0);
                     }
                     Debug.Assert(payloadLength != -1);
@@ -1234,11 +1234,11 @@ namespace Lucene.Net.Codecs.Lucene40
 
                 if (storeOffsets)
                 {
-                    int offsetCode = proxIn.ReadVInt();
+                    int offsetCode = proxIn.ReadVInt32();
                     if ((offsetCode & 1) != 0)
                     {
                         // new offset length
-                        offsetLength = proxIn.ReadVInt();
+                        offsetLength = proxIn.ReadVInt32();
                     }
                     startOffset += (int)((uint)offsetCode >> 1);
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
index c53981f..aec213d 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoReader.cs
@@ -52,7 +52,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 CodecUtil.CheckHeader(input, Lucene40SegmentInfoFormat.CODEC_NAME, Lucene40SegmentInfoFormat.VERSION_START, Lucene40SegmentInfoFormat.VERSION_CURRENT);
                 string version = input.ReadString();
-                int docCount = input.ReadInt();
+                int docCount = input.ReadInt32();
                 if (docCount < 0)
                 {
                     throw new CorruptIndexException("invalid docCount: " + docCount + " (resource=" + input + ")");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
index a75f066..a2d2925 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SegmentInfoWriter.cs
@@ -57,7 +57,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 CodecUtil.WriteHeader(output, Lucene40SegmentInfoFormat.CODEC_NAME, Lucene40SegmentInfoFormat.VERSION_CURRENT);
                 // Write the Lucene version that created this segment, since 3.1
                 output.WriteString(si.Version);
-                output.WriteInt(si.DocCount);
+                output.WriteInt32(si.DocCount);
 
                 output.WriteByte((byte)(sbyte)(si.UseCompoundFile ? SegmentInfo.YES : SegmentInfo.NO));
                 output.WriteStringStringMap(si.Diagnostics);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SkipListReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SkipListReader.cs
index 1230dec..cacafe5 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SkipListReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40SkipListReader.cs
@@ -148,27 +148,27 @@ namespace Lucene.Net.Codecs.Lucene40
                 // to read the current payload/offset lengths
                 // because it differs from the lengths of the
                 // previous payload/offset
-                delta = skipStream.ReadVInt();
+                delta = skipStream.ReadVInt32();
                 if ((delta & 1) != 0)
                 {
                     if (currentFieldStoresPayloads)
                     {
-                        payloadLength[level] = skipStream.ReadVInt();
+                        payloadLength[level] = skipStream.ReadVInt32();
                     }
                     if (currentFieldStoresOffsets)
                     {
-                        offsetLength[level] = skipStream.ReadVInt();
+                        offsetLength[level] = skipStream.ReadVInt32();
                     }
                 }
                 delta = (int)((uint)delta >> 1);
             }
             else
             {
-                delta = skipStream.ReadVInt();
+                delta = skipStream.ReadVInt32();
             }
 
-            freqPointer[level] += skipStream.ReadVInt();
-            proxPointer[level] += skipStream.ReadVInt();
+            freqPointer[level] += skipStream.ReadVInt32();
+            proxPointer[level] += skipStream.ReadVInt32();
 
             return delta;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
index 9edb75e..ad88ab3 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsReader.cs
@@ -163,12 +163,12 @@ namespace Lucene.Net.Codecs.Lucene40
         public override void VisitDocument(int n, StoredFieldVisitor visitor)
         {
             SeekIndex(n);
-            fieldsStream.Seek(indexStream.ReadLong());
+            fieldsStream.Seek(indexStream.ReadInt64());
 
-            int numFields = fieldsStream.ReadVInt();
+            int numFields = fieldsStream.ReadVInt32();
             for (int fieldIDX = 0; fieldIDX < numFields; fieldIDX++)
             {
-                int fieldNumber = fieldsStream.ReadVInt();
+                int fieldNumber = fieldsStream.ReadVInt32();
                 FieldInfo fieldInfo = fieldInfos.FieldInfo(fieldNumber);
 
                 int bits = fieldsStream.ReadByte() & 0xFF;
@@ -198,19 +198,19 @@ namespace Lucene.Net.Codecs.Lucene40
                 switch (numeric)
                 {
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_INT:
-                        visitor.Int32Field(info, fieldsStream.ReadInt());
+                        visitor.Int32Field(info, fieldsStream.ReadInt32());
                         return;
 
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_LONG:
-                        visitor.Int64Field(info, fieldsStream.ReadLong());
+                        visitor.Int64Field(info, fieldsStream.ReadInt64());
                         return;
 
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_FLOAT:
-                        visitor.SingleField(info, Number.IntBitsToFloat(fieldsStream.ReadInt()));
+                        visitor.SingleField(info, Number.Int32BitsToSingle(fieldsStream.ReadInt32()));
                         return;
 
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_DOUBLE:
-                        visitor.DoubleField(info, BitConverter.Int64BitsToDouble(fieldsStream.ReadLong()));
+                        visitor.DoubleField(info, BitConverter.Int64BitsToDouble(fieldsStream.ReadInt64()));
                         return;
 
                     default:
@@ -219,7 +219,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
             else
             {
-                int length = fieldsStream.ReadVInt();
+                int length = fieldsStream.ReadVInt32();
                 var bytes = new byte[length];
                 fieldsStream.ReadBytes(bytes, 0, length);
                 if ((bits & Lucene40StoredFieldsWriter.FIELD_IS_BINARY) != 0)
@@ -244,12 +244,12 @@ namespace Lucene.Net.Codecs.Lucene40
                 {
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_INT:
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_FLOAT:
-                        fieldsStream.ReadInt();
+                        fieldsStream.ReadInt32();
                         return;
 
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_LONG:
                     case Lucene40StoredFieldsWriter.FIELD_IS_NUMERIC_DOUBLE:
-                        fieldsStream.ReadLong();
+                        fieldsStream.ReadInt64();
                         return;
 
                     default:
@@ -258,7 +258,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
             else
             {
-                int length = fieldsStream.ReadVInt();
+                int length = fieldsStream.ReadVInt32();
                 fieldsStream.Seek(fieldsStream.FilePointer + length);
             }
         }
@@ -272,7 +272,7 @@ namespace Lucene.Net.Codecs.Lucene40
         public IndexInput RawDocs(int[] lengths, int startDocID, int numDocs)
         {
             SeekIndex(startDocID);
-            long startOffset = indexStream.ReadLong();
+            long startOffset = indexStream.ReadInt64();
             long lastOffset = startOffset;
             int count = 0;
             while (count < numDocs)
@@ -282,7 +282,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 Debug.Assert(docID <= numTotalDocs);
                 if (docID < numTotalDocs)
                 {
-                    offset = indexStream.ReadLong();
+                    offset = indexStream.ReadInt64();
                 }
                 else
                 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
index 907b8b8..2083d1a 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40StoredFieldsWriter.cs
@@ -118,8 +118,8 @@ namespace Lucene.Net.Codecs.Lucene40
         // 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)
@@ -151,7 +151,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
         public override void WriteField(FieldInfo info, IIndexableField field)
         {
-            fieldsStream.WriteVInt(info.Number);
+            fieldsStream.WriteVInt32(info.Number);
             int bits = 0;
             BytesRef bytes;
             string @string;
@@ -208,7 +208,7 @@ namespace Lucene.Net.Codecs.Lucene40
 
             if (bytes != null)
             {
-                fieldsStream.WriteVInt(bytes.Length);
+                fieldsStream.WriteVInt32(bytes.Length);
                 fieldsStream.WriteBytes(bytes.Bytes, bytes.Offset, bytes.Length);
             }
             else if (@string != null)
@@ -219,19 +219,19 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 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
                 {
@@ -253,7 +253,7 @@ namespace Lucene.Net.Codecs.Lucene40
             long start = position;
             for (int i = 0; i < numDocs; i++)
             {
-                indexStream.WriteLong(position);
+                indexStream.WriteInt64(position);
                 position += lengths[i];
             }
             fieldsStream.CopyBytes(stream, position - start);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsReader.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsReader.cs
index d75ffef..52f3ea3 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsReader.cs
@@ -197,10 +197,10 @@ namespace Lucene.Net.Codecs.Lucene40
 
             SeekTvx(startDocID);
 
-            long tvdPosition = tvx.ReadLong();
+            long tvdPosition = tvx.ReadInt64();
             tvd.Seek(tvdPosition);
 
-            long tvfPosition = tvx.ReadLong();
+            long tvfPosition = tvx.ReadInt64();
             tvf.Seek(tvfPosition);
 
             long lastTvdPosition = tvdPosition;
@@ -213,8 +213,8 @@ namespace Lucene.Net.Codecs.Lucene40
                 Debug.Assert(docID <= numTotalDocs);
                 if (docID < numTotalDocs)
                 {
-                    tvdPosition = tvx.ReadLong();
-                    tvfPosition = tvx.ReadLong();
+                    tvdPosition = tvx.ReadInt64();
+                    tvfPosition = tvx.ReadInt64();
                 }
                 else
                 {
@@ -257,9 +257,9 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 this.outerInstance = outerInstance;
                 outerInstance.SeekTvx(docID);
-                outerInstance.tvd.Seek(outerInstance.tvx.ReadLong());
+                outerInstance.tvd.Seek(outerInstance.tvx.ReadInt64());
 
-                int fieldCount = outerInstance.tvd.ReadVInt();
+                int fieldCount = outerInstance.tvd.ReadVInt32();
                 Debug.Assert(fieldCount >= 0);
                 if (fieldCount != 0)
                 {
@@ -267,16 +267,16 @@ namespace Lucene.Net.Codecs.Lucene40
                     fieldFPs = new long[fieldCount];
                     for (int fieldUpto = 0; fieldUpto < fieldCount; fieldUpto++)
                     {
-                        int fieldNumber = outerInstance.tvd.ReadVInt();
+                        int fieldNumber = outerInstance.tvd.ReadVInt32();
                         fieldNumbers[fieldUpto] = fieldNumber;
                         fieldNumberToIndex[fieldNumber] = fieldUpto;
                     }
 
-                    long position = outerInstance.tvx.ReadLong();
+                    long position = outerInstance.tvx.ReadInt64();
                     fieldFPs[0] = position;
                     for (int fieldUpto = 1; fieldUpto < fieldCount; fieldUpto++)
                     {
-                        position += outerInstance.tvd.ReadVLong();
+                        position += outerInstance.tvd.ReadVInt64();
                         fieldFPs[fieldUpto] = position;
                     }
                 }
@@ -353,7 +353,7 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 this.outerInstance = outerInstance;
                 outerInstance.tvf.Seek(tvfFP);
-                numTerms = outerInstance.tvf.ReadVInt();
+                numTerms = outerInstance.tvf.ReadVInt32();
                 byte bits = outerInstance.tvf.ReadByte();
                 storePositions = (bits & STORE_POSITIONS_WITH_TERMVECTOR) != 0;
                 storeOffsets = (bits & STORE_OFFSET_WITH_TERMVECTOR) != 0;
@@ -542,12 +542,12 @@ namespace Lucene.Net.Codecs.Lucene40
                     return null;
                 }
                 term.CopyBytes(lastTerm);
-                int start = tvf.ReadVInt();
-                int deltaLen = tvf.ReadVInt();
+                int start = tvf.ReadVInt32();
+                int deltaLen = tvf.ReadVInt32();
                 term.Length = start + deltaLen;
                 term.Grow(term.Length);
                 tvf.ReadBytes(term.Bytes, start, deltaLen);
-                freq = tvf.ReadVInt();
+                freq = tvf.ReadVInt32();
 
                 if (storePayloads)
                 {
@@ -557,13 +557,13 @@ namespace Lucene.Net.Codecs.Lucene40
                     int pos = 0;
                     for (int posUpto = 0; posUpto < freq; posUpto++)
                     {
-                        int code = tvf.ReadVInt();
+                        int code = tvf.ReadVInt32();
                         pos += (int)((uint)code >> 1);
                         positions[posUpto] = pos;
                         if ((code & 1) != 0)
                         {
                             // length change
-                            lastPayloadLength = tvf.ReadVInt();
+                            lastPayloadLength = tvf.ReadVInt32();
                         }
                         payloadOffsets[posUpto] = totalPayloadLength;
                         totalPayloadLength += lastPayloadLength;
@@ -581,7 +581,7 @@ namespace Lucene.Net.Codecs.Lucene40
                     int pos = 0;
                     for (int posUpto = 0; posUpto < freq; posUpto++)
                     {
-                        pos += tvf.ReadVInt();
+                        pos += tvf.ReadVInt32();
                         positions[posUpto] = pos;
                     }
                 }
@@ -593,8 +593,8 @@ namespace Lucene.Net.Codecs.Lucene40
                     int offset = 0;
                     for (int posUpto = 0; posUpto < freq; posUpto++)
                     {
-                        startOffsets[posUpto] = offset + tvf.ReadVInt();
-                        offset = endOffsets[posUpto] = startOffsets[posUpto] + tvf.ReadVInt();
+                        startOffsets[posUpto] = offset + tvf.ReadVInt32();
+                        offset = endOffsets[posUpto] = startOffsets[posUpto] + tvf.ReadVInt32();
                     }
                 }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
index 0ed2847..d528a2c 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene40/Lucene40TermVectorsWriter.cs
@@ -93,9 +93,9 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             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);
         }
@@ -115,8 +115,8 @@ namespace Lucene.Net.Codecs.Lucene40
             lastTerm.Length = 0;
             lastPayloadLength = -1; // force first payload to write its length
             fps[fieldCount++] = tvf.FilePointer;
-            tvd.WriteVInt(info.Number);
-            tvf.WriteVInt(numTerms);
+            tvd.WriteVInt32(info.Number);
+            tvf.WriteVInt32(numTerms);
             sbyte bits = 0x0;
             if (positions)
             {
@@ -138,7 +138,7 @@ namespace Lucene.Net.Codecs.Lucene40
             Debug.Assert(fieldCount == numVectorFields);
             for (int i = 1; i < fieldCount; i++)
             {
-                tvd.WriteVLong(fps[i] - fps[i - 1]);
+                tvd.WriteVInt64(fps[i] - fps[i - 1]);
             }
         }
 
@@ -160,10 +160,10 @@ namespace Lucene.Net.Codecs.Lucene40
         {
             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;
 
@@ -192,10 +192,10 @@ namespace Lucene.Net.Codecs.Lucene40
                 // we do avoid buffering the offsets in RAM though.
                 for (int i = 0; i < numProx; i++)
                 {
-                    int code = positions.ReadVInt();
+                    int code = positions.ReadVInt32();
                     if ((code & 1) == 1)
                     {
-                        int length = positions.ReadVInt();
+                        int length = positions.ReadVInt32();
                         scratch.Grow(length);
                         scratch.Length = length;
                         positions.ReadBytes(scratch.Bytes, scratch.Offset, scratch.Length);
@@ -213,7 +213,7 @@ namespace Lucene.Net.Codecs.Lucene40
                 // pure positions, no payloads
                 for (int i = 0; i < numProx; i++)
                 {
-                    tvf.WriteVInt((int)((uint)positions.ReadVInt() >> 1));
+                    tvf.WriteVInt32((int)((uint)positions.ReadVInt32() >> 1));
                 }
             }
 
@@ -221,8 +221,8 @@ namespace Lucene.Net.Codecs.Lucene40
             {
                 for (int i = 0; i < numProx; i++)
                 {
-                    tvf.WriteVInt(offsets.ReadVInt());
-                    tvf.WriteVInt(offsets.ReadVInt());
+                    tvf.WriteVInt32(offsets.ReadVInt32());
+                    tvf.WriteVInt32(offsets.ReadVInt32());
                 }
             }
         }
@@ -253,8 +253,8 @@ namespace Lucene.Net.Codecs.Lucene40
             else if (offsets)
             {
                 // write offset deltas
-                tvf.WriteVInt(startOffset - lastOffset);
-                tvf.WriteVInt(endOffset - startOffset);
+                tvf.WriteVInt32(startOffset - lastOffset);
+                tvf.WriteVInt32(endOffset - startOffset);
                 lastOffset = endOffset;
             }
         }
@@ -274,8 +274,8 @@ namespace Lucene.Net.Codecs.Lucene40
                 {
                     for (int i = 0; i < bufferedIndex; 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];
                     }
                 }
@@ -291,12 +291,12 @@ namespace Lucene.Net.Codecs.Lucene40
                 if (payloadLength != lastPayloadLength)
                 {
                     lastPayloadLength = payloadLength;
-                    tvf.WriteVInt((delta << 1) | 1);
-                    tvf.WriteVInt(payloadLength);
+                    tvf.WriteVInt32((delta << 1) | 1);
+                    tvf.WriteVInt32(payloadLength);
                 }
                 else
                 {
-                    tvf.WriteVInt(delta << 1);
+                    tvf.WriteVInt32(delta << 1);
                 }
                 if (payloadLength > 0)
                 {
@@ -311,7 +311,7 @@ namespace Lucene.Net.Codecs.Lucene40
             }
             else
             {
-                tvf.WriteVInt(delta);
+                tvf.WriteVInt32(delta);
             }
         }
 
@@ -345,9 +345,9 @@ namespace Lucene.Net.Codecs.Lucene40
             long tvfStart = tvfPosition;
             for (int i = 0; i < numDocs; i++)
             {
-                tvx.WriteLong(tvdPosition);
+                tvx.WriteInt64(tvdPosition);
                 tvdPosition += tvdLengths[i];
-                tvx.WriteLong(tvfPosition);
+                tvx.WriteInt64(tvfPosition);
                 tvfPosition += tvfLengths[i];
             }
             tvd.CopyBytes(reader.TvdStream, tvdPosition - tvdStart);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f7432173/src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs b/src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs
index aae7d91..2c17527 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene41/ForUtil.cs
@@ -110,7 +110,7 @@ namespace Lucene.Net.Codecs.Lucene41
         /// </summary>
         internal ForUtil(float acceptableOverheadRatio, DataOutput @out)
         {
-            @out.WriteVInt(PackedInts.VERSION_CURRENT);
+            @out.WriteVInt32(PackedInts.VERSION_CURRENT);
             encodedSizes = new int[33];
             encoders = new PackedInts.IEncoder[33];
             decoders = new PackedInts.IDecoder[33];
@@ -126,7 +126,7 @@ namespace Lucene.Net.Codecs.Lucene41
                 decoders[bpv] = PackedInts.GetDecoder(formatAndBits.Format, PackedInts.VERSION_CURRENT, formatAndBits.BitsPerValue);
                 iterations[bpv] = ComputeIterations(decoders[bpv]);
 
-                @out.WriteVInt(formatAndBits.Format.Id << 5 | (formatAndBits.BitsPerValue - 1));
+                @out.WriteVInt32(formatAndBits.Format.Id << 5 | (formatAndBits.BitsPerValue - 1));
             }
         }
 
@@ -135,7 +135,7 @@ namespace Lucene.Net.Codecs.Lucene41
         /// </summary>
         internal ForUtil(DataInput @in)
         {
-            int packedIntsVersion = @in.ReadVInt();
+            int packedIntsVersion = @in.ReadVInt32();
             PackedInts.CheckVersion(packedIntsVersion);
             encodedSizes = new int[33];
             encoders = new PackedInts.IEncoder[33];
@@ -144,7 +144,7 @@ namespace Lucene.Net.Codecs.Lucene41
 
             for (int bpv = 1; bpv <= 32; ++bpv)
             {
-                var code = @in.ReadVInt();
+                var code = @in.ReadVInt32();
                 var formatId = (int)((uint)code >> 5);
                 var bitsPerValue = (code & 31) + 1;
 
@@ -169,7 +169,7 @@ namespace Lucene.Net.Codecs.Lucene41
             if (IsAllEqual(data))
             {
                 @out.WriteByte((byte)(sbyte)ALL_VALUES_EQUAL);
-                @out.WriteVInt(data[0]);
+                @out.WriteVInt32(data[0]);
                 return;
             }
 
@@ -201,7 +201,7 @@ namespace Lucene.Net.Codecs.Lucene41
 
             if (numBits == ALL_VALUES_EQUAL)
             {
-                int value = @in.ReadVInt();
+                int value = @in.ReadVInt32();
                 Arrays.Fill(decoded, 0, Lucene41PostingsFormat.BLOCK_SIZE, value);
                 return;
             }
@@ -226,7 +226,7 @@ namespace Lucene.Net.Codecs.Lucene41
             int numBits = @in.ReadByte();
             if (numBits == ALL_VALUES_EQUAL)
             {
-                @in.ReadVInt();
+                @in.ReadVInt32();
                 return;
             }
             Debug.Assert(numBits > 0 && numBits <= 32, numBits.ToString());


Mime
View raw message