KickJava   Java API By Example, From Geeks To Geeks.

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

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

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

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