Suggestion for improving the MultipartStream::findSeparator() method.

I am proposing that the algorithm be changed to utilize the Boyer Moore
pattern matching algorithm. For a nice animated explanation of the
algorithm follow 

http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/fstrpos-example.html

I have added a member to the class <code>int[] shift</code>, added a
<code>prepareBoundarySearch()</code> method and altered the
<code>findSeparator()</code> method to use this algorithm.  The
prepareBoundarySearch method is called in the constructor and in the
setBoundary(...) methods.

sorry I do not have or know cvs, so i have just attached the altered
class file

Ricardo Clements
[EMAIL PROTECTED]

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to