Author: markt Date: Tue Nov 17 20:30:39 2009 New Revision: 881493 URL: http://svn.apache.org/viewvc?rev=881493&view=rev Log: Update re-packaged commons-fileupload to 1.2.1 Done using svn copy from tags in commons so merging future updates should be easier Changes made/required: - All classes in a single renamed package - Removed unused Util methods (so even more classes were not required) - Removed some deprecated classes There is almost certainly more to be done in terms of pruning to the minimum required. Will so that once Servlet 3 file upload has been implemented.
Added: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java - copied, changed from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Closeable.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/Closeable.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItem.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItemFactory.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleanerCleanup.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java - copied, changed from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileCleaningTracker.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java - copied, changed from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileDeleteStrategy.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItem.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItem.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemFactory.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemFactory.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeaders.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersImpl.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/FileItemHeadersImpl.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeadersSupport.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemIterator.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemIterator.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemStream.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemStream.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUpload.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUpload.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadBase.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadException.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadException.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUtils.java - copied, changed from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileUtils.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/IOUtils.java - copied, changed from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/IOUtils.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/LimitedInputStream.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/LimitedInputStream.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/MultipartStream.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/MultipartStream.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ParameterParser.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/ParameterParser.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ProgressListener.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/ProgressListener.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/RequestContext.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/RequestContext.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ServletFileUpload.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/ServletFileUpload.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ServletRequestContext.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Streams.java - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/Streams.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/package.html - copied, changed from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/package.html Removed: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DefaultFileItem.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DefaultFileItemFactory.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileUpload.java Modified: tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ThresholdingOutputStream.java Modified: tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java?rev=881493&r1=881492&r2=881493&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java (original) +++ tomcat/trunk/java/org/apache/catalina/manager/HTMLManagerServlet.java Tue Nov 17 20:30:39 2009 @@ -49,7 +49,8 @@ import org.apache.catalina.util.RequestUtil; import org.apache.catalina.util.ServerInfo; import org.apache.catalina.util.URLEncoder; -import org.apache.tomcat.util.http.fileupload.DiskFileUpload; +import org.apache.tomcat.util.http.fileupload.DiskFileItemFactory; +import org.apache.tomcat.util.http.fileupload.ServletFileUpload; import org.apache.tomcat.util.http.fileupload.FileItem; /** @@ -260,15 +261,18 @@ protected String upload(HttpServletRequest request) throws IOException { String message = ""; - // Create a new file upload handler - DiskFileUpload upload = new DiskFileUpload(); - // Get the tempdir File tempdir = (File) getServletContext().getAttribute (ServletContext.TEMPDIR); + + // Create a new file upload handler + DiskFileItemFactory factory = new DiskFileItemFactory(); + factory.setRepository(tempdir.getCanonicalFile()); + ServletFileUpload upload = new ServletFileUpload(); + upload.setFileItemFactory(factory); + // Set upload parameters upload.setSizeMax(-1); - upload.setRepositoryPath(tempdir.getCanonicalPath()); // Parse the request String basename = null; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java (from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java&p1=commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java&r1=881437&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/output/ByteArrayOutputStream.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/ByteArrayOutputStream.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.io.output; +package org.apache.tomcat.util.http.fileupload; import java.io.IOException; import java.io.InputStream; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Closeable.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/Closeable.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Closeable.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Closeable.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/Closeable.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/Closeable.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/Closeable.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.util; +package org.apache.tomcat.util.http.fileupload; import java.io.IOException; Modified: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java?rev=881493&r1=881492&r2=881493&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DeferredFileOutputStream.java Tue Nov 17 20:30:39 2009 @@ -14,23 +14,28 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - - package org.apache.tomcat.util.http.fileupload; -import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; + /** - * <p>An output stream which will retain data in memory until a specified + * An output stream which will retain data in memory until a specified * threshold is reached, and only then commit it to disk. If the stream is * closed before the threshold is reached, the data will not be written to - * disk at all.</p> + * disk at all. + * <p> + * This class originated in FileUpload processing. In this use case, you do + * not know in advance the size of the file being uploaded. If the file is small + * you want to store it in memory (for speed), but if the file is large you want + * to store it to file (to avoid memory issues). * * @author <a href="mailto:mart...@apache.org">Martin Cooper</a> + * @author gaxzerow * * @version $Id$ */ @@ -42,7 +47,7 @@ /** - * The output stream to which data will be written prior to the threshold + * The output stream to which data will be written prior to the theshold * being reached. */ private ByteArrayOutputStream memoryOutputStream; @@ -61,6 +66,26 @@ */ private File outputFile; + /** + * The temporary file prefix. + */ + private String prefix; + + /** + * The temporary file suffix. + */ + private String suffix; + + /** + * The directory to use for temporary files. + */ + private File directory; + + + /** + * True when close() has been called successfully. + */ + private boolean closed = false; // ----------------------------------------------------------- Constructors @@ -77,18 +102,34 @@ super(threshold); this.outputFile = outputFile; - if (threshold < DefaultFileItemFactory.DEFAULT_SIZE_THRESHOLD) { - // Small threshold, use it - memoryOutputStream = new ByteArrayOutputStream(threshold); - } else { - // Large threshold. Use default and array will expand if required - memoryOutputStream = new ByteArrayOutputStream( - DefaultFileItemFactory.DEFAULT_SIZE_THRESHOLD); - } + memoryOutputStream = new ByteArrayOutputStream(); currentOutputStream = memoryOutputStream; } + /** + * Constructs an instance of this class which will trigger an event at the + * specified threshold, and save data to a temporary file beyond that point. + * + * @param threshold The number of bytes at which to trigger an event. + * @param prefix Prefix to use for the temporary file. + * @param suffix Suffix to use for the temporary file. + * @param directory Temporary file directory. + * + * @since Commons IO 1.4 + */ + public DeferredFileOutputStream(int threshold, String prefix, String suffix, File directory) + { + this(threshold, (File)null); + if (prefix == null) { + throw new IllegalArgumentException("Temporary file prefix is missing"); + } + this.prefix = prefix; + this.suffix = suffix; + this.directory = directory; + } + + // --------------------------------------- ThresholdingOutputStream methods @@ -100,7 +141,6 @@ * * @exception IOException if an error occurs. */ - @Override protected OutputStream getStream() throws IOException { return currentOutputStream; @@ -115,12 +155,13 @@ * * @exception IOException if an error occurs. */ - @Override protected void thresholdReached() throws IOException { - byte[] data = memoryOutputStream.toByteArray(); + if (prefix != null) { + outputFile = File.createTempFile(prefix, suffix, directory); + } FileOutputStream fos = new FileOutputStream(outputFile); - fos.write(data); + memoryOutputStream.writeTo(fos); currentOutputStream = fos; memoryOutputStream = null; } @@ -161,9 +202,15 @@ /** - * Returns the data for this output stream as a <code>File</code>, assuming - * that the data was written to disk. If the data was retained in memory, - * this method returns <code>null</code>. + * Returns either the output file specified in the constructor or + * the temporary file created or null. + * <p> + * If the constructor specifying the file is used then it returns that + * same output file, even when threashold has not been reached. + * <p> + * If constructor specifying a temporary file prefix/suffix is used + * then the temporary file created once the threashold is reached is returned + * If the threshold was not reached then <code>null</code> is returned. * * @return The file for this output stream, or <code>null</code> if no such * file exists. @@ -172,4 +219,49 @@ { return outputFile; } + + + /** + * Closes underlying output stream, and mark this as closed + * + * @exception IOException if an error occurs. + */ + public void close() throws IOException + { + super.close(); + closed = true; + } + + + /** + * Writes the data from this output stream to the specified output stream, + * after it has been closed. + * + * @param out output stream to write to. + * @exception IOException if this stream is not yet closed or an error occurs. + */ + public void writeTo(OutputStream out) throws IOException + { + // we may only need to check if this is closed if we are working with a file + // but we should force the habit of closing wether we are working with + // a file or memory. + if (!closed) + { + throw new IOException("Stream not closed"); + } + + if(isInMemory()) + { + memoryOutputStream.writeTo(out); + } + else + { + FileInputStream fis = new FileInputStream(outputFile); + try { + IOUtils.copy(fis, out); + } finally { + IOUtils.closeQuietly(fis); + } + } + } } Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItem.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItem.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItem.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItem.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.disk; +package org.apache.tomcat.util.http.fileupload; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; @@ -30,14 +30,6 @@ import java.io.UnsupportedEncodingException; import java.util.Map; -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileItemHeaders; -import org.apache.commons.fileupload.FileItemHeadersSupport; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.ParameterParser; -import org.apache.commons.io.IOUtils; -import org.apache.commons.io.output.DeferredFileOutputStream; - /** * <p> The default implementation of the Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItemFactory.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItemFactory.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItemFactory.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/disk/DiskFileItemFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/DiskFileItemFactory.java Tue Nov 17 20:30:39 2009 @@ -14,14 +14,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.disk; +package org.apache.tomcat.util.http.fileupload; import java.io.File; -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileItemFactory; -import org.apache.commons.io.FileCleaningTracker; - /** * <p>The default {...@link org.apache.commons.fileupload.FileItemFactory} Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleanerCleanup.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleanerCleanup.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleanerCleanup.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleanerCleanup.java Tue Nov 17 20:30:39 2009 @@ -14,14 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.servlet; +package org.apache.tomcat.util.http.fileupload; import javax.servlet.ServletContext; import javax.servlet.ServletContextListener; import javax.servlet.ServletContextEvent; -import org.apache.commons.io.FileCleaningTracker; - /** * A servlet context listener, which ensures that the Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java (from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileCleaningTracker.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java&p1=commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileCleaningTracker.java&r1=881437&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileCleaningTracker.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileCleaningTracker.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.io; +package org.apache.tomcat.util.http.fileupload; import java.io.File; import java.lang.ref.PhantomReference; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java (from r881437, commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileDeleteStrategy.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java&p1=commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileDeleteStrategy.java&r1=881437&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/io/tags/commons-io-1.4/src/java/org/apache/commons/io/FileDeleteStrategy.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileDeleteStrategy.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.io; +package org.apache.tomcat.util.http.fileupload; import java.io.File; import java.io.IOException; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItem.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItem.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItem.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItem.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItem.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItem.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItem.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.io.File; import java.io.IOException; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemFactory.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemFactory.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemFactory.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemFactory.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemFactory.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemFactory.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; /** Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeaders.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeaders.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeaders.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeaders.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.util.Iterator; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersImpl.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/FileItemHeadersImpl.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersImpl.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersImpl.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/FileItemHeadersImpl.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/util/FileItemHeadersImpl.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersImpl.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.util; +package org.apache.tomcat.util.http.fileupload; import java.io.Serializable; import java.util.ArrayList; @@ -24,7 +24,6 @@ import java.util.List; import java.util.Map; -import org.apache.commons.fileupload.FileItemHeaders; /** * Default implementation of the {...@link FileItemHeaders} interface. Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeadersSupport.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeadersSupport.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemHeadersSupport.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemHeadersSupport.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; /** * Interface that will indicate that {...@link FileItem} or {...@link FileItemStream} Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemIterator.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemIterator.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemIterator.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemIterator.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemIterator.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemIterator.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemIterator.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.io.IOException; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemStream.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemStream.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemStream.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemStream.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemStream.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileItemStream.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileItemStream.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.io.IOException; import java.io.InputStream; Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUpload.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUpload.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUpload.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUpload.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUpload.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUpload.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUpload.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; /** Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadBase.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadBase.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadBase.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadBase.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.io.IOException; import java.io.InputStream; @@ -28,13 +28,7 @@ import javax.servlet.http.HttpServletRequest; -import org.apache.commons.fileupload.MultipartStream.ItemInputStream; -import org.apache.commons.fileupload.servlet.ServletFileUpload; -import org.apache.commons.fileupload.servlet.ServletRequestContext; -import org.apache.commons.fileupload.util.Closeable; -import org.apache.commons.fileupload.util.FileItemHeadersImpl; -import org.apache.commons.fileupload.util.LimitedInputStream; -import org.apache.commons.fileupload.util.Streams; +import org.apache.tomcat.util.http.fileupload.MultipartStream.ItemInputStream; /** Copied: tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadException.java (from r881414, commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadException.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadException.java?p2=tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadException.java&p1=commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadException.java&r1=881414&r2=881493&rev=881493&view=diff ============================================================================== --- commons/proper/fileupload/tags/commons-fileupload-1.2.1/src/java/org/apache/commons/fileupload/FileUploadException.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/http/fileupload/FileUploadException.java Tue Nov 17 20:30:39 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload; +package org.apache.tomcat.util.http.fileupload; import java.io.PrintStream; import java.io.PrintWriter; --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org