code: private static Field.TermVector getTermVectorParameter(int flags)
     {
        if (((flags & STORE_POSITION_WITH_TERM_VECTOR_FLAG) > 0) && ((flags & STORE_OFFSET_WITH_TERM_VECTOR_FLAG) > 0))
        {
           return Field.TermVector.WITH_POSITIONS_OFFSETS;
        }
        else if ((flags & STORE_POSITION_WITH_TERM_VECTOR_FLAG) > 0)
        {
           return Field.TermVector.WITH_POSITIONS;
        }
        else if ((flags & STORE_OFFSET_WITH_TERM_VECTOR_FLAG) > 0)
        {
           return Field.TermVector.WITH_OFFSETS;
        }
        else if ((flags & STORE_TERM_VECTOR_FLAG) > 0)
        {
           return Field.TermVector.YES;
        }
        else
        {
           return Field.TermVector.NO;
        }
     }
docs: Returns the term vector parameter extracted from the flags.
  
  @param flags the flags of the Lucene field.
  @return the term vector parameter corresponding to the given flags.