java-user@lucene.apache.org
[Top] [All Lists]

RE: Clarification on TokenStream.close() needed

Subject: RE: Clarification on TokenStream.close() needed
From: Teruhiko Kurosaka
Date: Tue, 20 Oct 2009 19:47:27 -0400
> From: Uwe Schindler [mailto:uwe@xxxxxxxxxxx] 

> TokenStream.close() is called (and was everytime called 
> before, too), when the tokenization is done to close the 
> Reader. The call to reset(Reader) is the same like creating a 
> new instance (only that the cost of creating a new instance 
> is not needed).

Shouldn't that be done in end()? If not, what is
the difference in purpose between end() and close()?
What is the purpose of end()?

In any event, if close() is meant to close the Reader,
I think the current description of TokenStream.close() 
in the javadoc is a bit confusing.  Instead of saying
"Releases resources associated with this stream.", perhaps
it should say something like "Release resources associated with
the current input source.".

-kuro
  
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>