001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.fileupload;
018    
019    import java.io.File;
020    import org.apache.commons.fileupload.disk.DiskFileItem;
021    
022    
023    /**
024     * <p> The default implementation of the
025     * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
026     *
027     * <p> After retrieving an instance of this class from a {@link
028     * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
029     * {@link org.apache.commons.fileupload.DiskFileUpload
030     * #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
031     * either request all contents of file at once using {@link #get()} or
032     * request an {@link java.io.InputStream InputStream} with
033     * {@link #getInputStream()} and process the file without attempting to load
034     * it into memory, which may come handy with large files.
035     *
036     * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
037     * @author <a href="mailto:sean@informage.net">Sean Legassick</a>
038     * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
039     * @author <a href="mailto:jmcnally@apache.org">John McNally</a>
040     * @author <a href="mailto:martinc@apache.org">Martin Cooper</a>
041     * @author Sean C. Sullivan
042     *
043     * @version $Id: DefaultFileItem.java 479262 2006-11-26 03:09:24Z niallp $
044     *
045     * @deprecated Use <code>DiskFileItem</code> instead.
046     */
047    public class DefaultFileItem
048        extends DiskFileItem {
049    
050        // ----------------------------------------------------------- Constructors
051    
052    
053        /**
054         * Constructs a new <code>DefaultFileItem</code> instance.
055         *
056         * @param fieldName     The name of the form field.
057         * @param contentType   The content type passed by the browser or
058         *                      <code>null</code> if not specified.
059         * @param isFormField   Whether or not this item is a plain form field, as
060         *                      opposed to a file upload.
061         * @param fileName      The original filename in the user's filesystem, or
062         *                      <code>null</code> if not specified.
063         * @param sizeThreshold The threshold, in bytes, below which items will be
064         *                      retained in memory and above which they will be
065         *                      stored as a file.
066         * @param repository    The data repository, which is the directory in
067         *                      which files will be created, should the item size
068         *                      exceed the threshold.
069         *
070         * @deprecated Use <code>DiskFileItem</code> instead.
071         */
072        public DefaultFileItem(String fieldName, String contentType,
073                boolean isFormField, String fileName, int sizeThreshold,
074                File repository) {
075            super(fieldName, contentType, isFormField, fileName, sizeThreshold,
076                    repository);
077        }
078    
079    
080    }