public TruncateTokenFilter(TokenStream input, int length) {super(input);if (length < 1)throw new IllegalArgumentException("length parameter must be a positive number: " + length);this.length = length;}
public TruncateTokenFilter(TokenStream input, int length): base(input){if (length < 1){throw new System.ArgumentOutOfRangeException("length parameter must be a positive number: " + length);}this.length = length;this.termAttribute = AddAttribute<ICharTermAttribute>();this.keywordAttr = AddAttribute<IKeywordAttribute>();}