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 */
017package org.apache.commons.fileupload;
018
019import java.io.File;
020import org.apache.commons.fileupload.disk.DiskFileItem;
021
022/**
023 * <p> The default implementation of the
024 * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
025 *
026 * <p> After retrieving an instance of this class from a {@link
027 * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
028 * {@link org.apache.commons.fileupload.DiskFileUpload
029 * #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
030 * either request all contents of file at once using {@link #get()} or
031 * request an {@link java.io.InputStream InputStream} with
032 * {@link #getInputStream()} and process the file without attempting to load
033 * it into memory, which may come handy with large files.
034 *
035 * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
036 */
037@Deprecated
038public class DefaultFileItem
039    extends DiskFileItem {
040
041    // ----------------------------------------------------------- Constructors
042
043    /**
044     * Constructs a new <code>DefaultFileItem</code> instance.
045     *
046     * @param fieldName     The name of the form field.
047     * @param contentType   The content type passed by the browser or
048     *                      <code>null</code> if not specified.
049     * @param isFormField   Whether or not this item is a plain form field, as
050     *                      opposed to a file upload.
051     * @param fileName      The original filename in the user's filesystem, or
052     *                      <code>null</code> if not specified.
053     * @param sizeThreshold The threshold, in bytes, below which items will be
054     *                      retained in memory and above which they will be
055     *                      stored as a file.
056     * @param repository    The data repository, which is the directory in
057     *                      which files will be created, should the item size
058     *                      exceed the threshold.
059     *
060     * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
061     */
062    @Deprecated
063    public DefaultFileItem(String fieldName, String contentType,
064            boolean isFormField, String fileName, int sizeThreshold,
065            File repository) {
066        super(fieldName, contentType, isFormField, fileName, sizeThreshold,
067                repository);
068    }
069
070}