commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Clements <rclements...@yahoo.com>
Subject [Patch] for MultipartStream.java of FileUpload project
Date Tue, 11 Feb 2003 23:43:13 GMT
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
ricardo.clements@conceptrendering.com

__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

Mime
View raw message