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;
020
021import org.apache.commons.fileupload.disk.DiskFileItem;
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 * @deprecated 1.1 Use {@code DiskFileItem} instead.
037 */
038@Deprecated
039public class DefaultFileItem
040    extends DiskFileItem {
041
042    /**
043     * Constructs a new {@code DefaultFileItem} instance.
044     *
045     * @param fieldName     The name of the form field.
046     * @param contentType   The content type passed by the browser or
047     *                      {@code null} if not specified.
048     * @param isFormField   Whether or not this item is a plain form field, as
049     *                      opposed to a file upload.
050     * @param fileName      The original file name in the user's file system, or
051     *                      {@code null} if not specified.
052     * @param sizeThreshold The threshold, in bytes, below which items will be
053     *                      retained in memory and above which they will be
054     *                      stored as a file.
055     * @param repository    The data repository, which is the directory in
056     *                      which files will be created, should the item size
057     *                      exceed the threshold.
058     *
059     * @deprecated 1.1 Use {@code DiskFileItem} instead.
060     */
061    @Deprecated
062    public DefaultFileItem(final String fieldName, final String contentType,
063            final boolean isFormField, final String fileName, final int sizeThreshold,
064            final File repository) {
065        super(fieldName, contentType, isFormField, fileName, sizeThreshold,
066                repository);
067    }
068
069}