commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Clements <>
Subject [Patch] for 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

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

Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

View raw message