示例#1
0
 public override StoredFieldsReader clone()
 {
     if (@in == null)
     {
         throw new AlreadyClosedException("this FieldsReader is closed");
     }
     return(new SimpleTextStoredFieldsReader(offsets, @in.clone(), fieldInfos));
 }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public index.NumericDocValues getNumeric(index.FieldInfo fieldInfo) throws java.io.IOException
        public override NumericDocValues getNumeric(FieldInfo fieldInfo)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final OneField field = fields.get(fieldInfo.name);
            OneField field = fields[fieldInfo.name];

            Debug.Assert(field != null);

            // SegmentCoreReaders already verifies this field is
            // valid:
            Debug.Assert(field != null, "field=" + fieldInfo.name + " fields=" + fields);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final store.IndexInput in = data.clone();
            IndexInput @in = data.clone();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final util.BytesRef scratch = new util.BytesRef();
            BytesRef scratch = new BytesRef();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.text.DecimalFormat decoder = new java.text.DecimalFormat(field.pattern, new java.text.DecimalFormatSymbols(java.util.Locale.ROOT));
            DecimalFormat decoder = new DecimalFormat(field.pattern, new DecimalFormatSymbols(Locale.ROOT));

            decoder.ParseBigDecimal = true;

            return(new NumericDocValuesAnonymousInnerClassHelper(this, field, @in, scratch, decoder));
        }