//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void readFields(store.IndexInput meta) throws java.io.IOException
        private void readFields(IndexInput meta)
        {
            int fieldNumber = meta.readVInt();

            while (fieldNumber != -1)
            {
                int fieldType = meta.readByte();
                if (fieldType == NUMBER)
                {
                    numerics[fieldNumber] = readNumericEntry(meta);
                }
                else if (fieldType == BYTES)
                {
                    binaries[fieldNumber] = readBinaryEntry(meta);
                }
                else if (fieldType == SORTED)
                {
                    sorteds[fieldNumber] = readSortedEntry(meta);
                }
                else if (fieldType == SORTED_SET)
                {
                    sortedSets[fieldNumber] = readSortedSetEntry(meta);
                }
                else
                {
                    throw new CorruptIndexException("invalid entry type: " + fieldType + ", input=" + meta);
                }
                fieldNumber = meta.readVInt();
            }
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private NumericEntry readNumericEntry(store.IndexInput meta) throws java.io.IOException
        private NumericEntry readNumericEntry(IndexInput meta)
        {
            NumericEntry entry = new NumericEntry();

            entry.offset        = meta.readLong();
            entry.count         = meta.readInt();
            entry.missingOffset = meta.readLong();
            if (entry.missingOffset != -1)
            {
                entry.missingBytes = meta.readLong();
            }
            else
            {
                entry.missingBytes = 0;
            }
            entry.byteWidth = meta.readByte();

            return(entry);
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private void readFields(store.IndexInput meta, index.FieldInfos infos) throws java.io.IOException
        private void readFields(IndexInput meta, FieldInfos infos)
        {
            int fieldNumber = meta.readVInt();

            while (fieldNumber != -1)
            {
                int fieldType = meta.readByte();
                if (fieldType == NUMBER)
                {
                    NumericEntry entry = new NumericEntry();
                    entry.offset        = meta.readLong();
                    entry.missingOffset = meta.readLong();
                    if (entry.missingOffset != -1)
                    {
                        entry.missingBytes = meta.readLong();
                    }
                    else
                    {
                        entry.missingBytes = 0;
                    }
                    entry.format = meta.readByte();
                    switch (entry.format)
                    {
                    case DELTA_COMPRESSED:
                    case TABLE_COMPRESSED:
                    case GCD_COMPRESSED:
                    case UNCOMPRESSED:
                        break;

                    default:
                        throw new CorruptIndexException("Unknown format: " + entry.format + ", input=" + meta);
                    }
                    if (entry.format != UNCOMPRESSED)
                    {
                        entry.packedIntsVersion = meta.readVInt();
                    }
                    numerics[fieldNumber] = entry;
                }
                else if (fieldType == BYTES)
                {
                    BinaryEntry entry = new BinaryEntry();
                    entry.offset        = meta.readLong();
                    entry.numBytes      = meta.readLong();
                    entry.missingOffset = meta.readLong();
                    if (entry.missingOffset != -1)
                    {
                        entry.missingBytes = meta.readLong();
                    }
                    else
                    {
                        entry.missingBytes = 0;
                    }
                    entry.minLength = meta.readVInt();
                    entry.maxLength = meta.readVInt();
                    if (entry.minLength != entry.maxLength)
                    {
                        entry.packedIntsVersion = meta.readVInt();
                        entry.blockSize         = meta.readVInt();
                    }
                    binaries[fieldNumber] = entry;
                }
                else if (fieldType == FST)
                {
                    FSTEntry entry = new FSTEntry();
                    entry.offset      = meta.readLong();
                    entry.numOrds     = meta.readVLong();
                    fsts[fieldNumber] = entry;
                }
                else
                {
                    throw new CorruptIndexException("invalid entry type: " + fieldType + ", input=" + meta);
                }
                fieldNumber = meta.readVInt();
            }
        }
Esempio n. 4
0
 public override byte readByte()
 {
     return(_indexInput.readByte());
 }