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 * @version $Id: DefaultFileItem.java 1454690 2013-03-09 12:08:48Z simonetripodi $
036 *
037 * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
038 */
039@Deprecated
040public class DefaultFileItem
041    extends DiskFileItem {
042
043    // ----------------------------------------------------------- Constructors
044
045    /**
046     * The UID to use when serializing this instance.
047     */
048    private static final long serialVersionUID = 4088572813833518255L;
049
050    /**
051     * Constructs a new <code>DefaultFileItem</code> instance.
052     *
053     * @param fieldName     The name of the form field.
054     * @param contentType   The content type passed by the browser or
055     *                      <code>null</code> if not specified.
056     * @param isFormField   Whether or not this item is a plain form field, as
057     *                      opposed to a file upload.
058     * @param fileName      The original filename in the user's filesystem, or
059     *                      <code>null</code> if not specified.
060     * @param sizeThreshold The threshold, in bytes, below which items will be
061     *                      retained in memory and above which they will be
062     *                      stored as a file.
063     * @param repository    The data repository, which is the directory in
064     *                      which files will be created, should the item size
065     *                      exceed the threshold.
066     *
067     * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
068     */
069    @Deprecated
070    public DefaultFileItem(String fieldName, String contentType,
071            boolean isFormField, String fileName, int sizeThreshold,
072            File repository) {
073        super(fieldName, contentType, isFormField, fileName, sizeThreshold,
074                repository);
075    }
076
077}