//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: private util.Bits getMissingBits(int fieldNumber, final long offset, final long length) throws java.io.IOException //JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET: private Bits getMissingBits(int fieldNumber, long offset, long length) { if (offset == -1) { return(new Bits.MatchAllBits(maxDoc)); } else { Bits instance; lock (this) { instance = docsWithFieldInstances[fieldNumber]; if (instance == null) { IndexInput data = this.data.clone(); data.seek(offset); Debug.Assert(length % 8 == 0); long[] bits = new long[(int)length >> 3]; for (int i = 0; i < bits.Length; i++) { bits[i] = data.readLong(); } instance = new FixedBitSet(bits, maxDoc); docsWithFieldInstances[fieldNumber] = instance; } } return(instance); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: private BinaryEntry readBinaryEntry(store.IndexInput meta) throws java.io.IOException private BinaryEntry readBinaryEntry(IndexInput meta) { BinaryEntry entry = new BinaryEntry(); entry.offset = meta.readLong(); entry.numBytes = meta.readInt(); entry.count = meta.readInt(); entry.missingOffset = meta.readLong(); if (entry.missingOffset != -1) { entry.missingBytes = meta.readLong(); } else { entry.missingBytes = 0; } return(entry); }
//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); }
private void SeekDir(IndexInput @in) { if (version >= FSTOrdTermsWriter.TERMS_VERSION_CHECKSUM) { @in.seek(@in.length() - CodecUtil.footerLength() - 8); } else { @in.seek(@in.length() - 8); } @in.seek(@in.readLong()); }
//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(); } }