KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > jforum > util > legacy > commons > fileupload > DefaultFileItem


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package net.jforum.util.legacy.commons.fileupload;
17
18 import java.io.File JavaDoc;
19
20 import net.jforum.util.legacy.commons.fileupload.disk.DiskFileItem;
21
22
23 /**
24  * <p> The default implementation of the
25  * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
26  *
27  * <p> After retrieving an instance of this class from a {@link
28  * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
29  * {@link org.apache.commons.fileupload.DiskFileUpload
30  * #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
31  * either request all contents of file at once using {@link #get()} or
32  * request an {@link java.io.InputStream InputStream} with
33  * {@link #getInputStream()} and process the file without attempting to load
34  * it into memory, which may come handy with large files.
35  *
36  * @author <a HREF="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
37  * @author <a HREF="mailto:sean@informage.net">Sean Legassick</a>
38  * @author <a HREF="mailto:jvanzyl@apache.org">Jason van Zyl</a>
39  * @author <a HREF="mailto:jmcnally@apache.org">John McNally</a>
40  * @author <a HREF="mailto:martinc@apache.org">Martin Cooper</a>
41  * @author Sean C. Sullivan
42  *
43  * @version $Id: DefaultFileItem.java,v 1.3 2005/07/26 03:05:00 rafaelsteil Exp $
44  *
45  * @deprecated Use <code>DiskFileItem</code> instead.
46  */

47 public class DefaultFileItem
48     extends DiskFileItem {
49
50     // ----------------------------------------------------------- Constructors
51

52
53     /**
54      * Constructs a new <code>DefaultFileItem</code> instance.
55      *
56      * @param fieldName The name of the form field.
57      * @param contentType The content type passed by the browser or
58      * <code>null</code> if not specified.
59      * @param isFormField Whether or not this item is a plain form field, as
60      * opposed to a file upload.
61      * @param fileName The original filename in the user's filesystem, or
62      * <code>null</code> if not specified.
63      * @param sizeThreshold The threshold, in bytes, below which items will be
64      * retained in memory and above which they will be
65      * stored as a file.
66      * @param repository The data repository, which is the directory in
67      * which files will be created, should the item size
68      * exceed the threshold.
69      *
70      * @deprecated Use <code>DiskFileItem</code> instead.
71      */

72     public DefaultFileItem(String JavaDoc fieldName, String JavaDoc contentType,
73             boolean isFormField, String JavaDoc fileName, int sizeThreshold,
74             File JavaDoc repository) {
75         super(fieldName, contentType, isFormField, fileName, sizeThreshold,
76                 repository);
77     }
78
79
80 }
81
Popular Tags