01: /*
02: * Copyright 2001-2004 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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;
19: import net.myvietnam.mvncore.web.fileupload.disk.DiskFileItem;
20:
21: /**
22: * <p> The default implementation of the
23: * {@link org.apache.commons.fileupload.FileItem FileItem} interface.
24: *
25: * <p> After retrieving an instance of this class from a {@link
26: * org.apache.commons.fileupload.DiskFileUpload DiskFileUpload} instance (see
27: * {@link org.apache.commons.fileupload.DiskFileUpload
28: * #parseRequest(javax.servlet.http.HttpServletRequest)}), you may
29: * either request all contents of file at once using {@link #get()} or
30: * request an {@link java.io.InputStream InputStream} with
31: * {@link #getInputStream()} and process the file without attempting to load
32: * it into memory, which may come handy with large files.
33: *
34: * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
35: * @author <a href="mailto:sean@informage.net">Sean Legassick</a>
36: * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
37: * @author <a href="mailto:jmcnally@apache.org">John McNally</a>
38: * @author <a href="mailto:martinc@apache.org">Martin Cooper</a>
39: * @author Sean C. Sullivan
40: *
41: * @version $Id: DefaultFileItem.java,v 1.2 2006/02/12 04:43:11 minhnn Exp $
42: *
43: * @deprecated Use <code>DiskFileItem</code> instead.
44: */
45: public class DefaultFileItem extends DiskFileItem {
46:
47: // ----------------------------------------------------------- Constructors
48:
49: /**
50: * Constructs a new <code>DefaultFileItem</code> instance.
51: *
52: * @param fieldName The name of the form field.
53: * @param contentType The content type passed by the browser or
54: * <code>null</code> if not specified.
55: * @param isFormField Whether or not this item is a plain form field, as
56: * opposed to a file upload.
57: * @param fileName The original filename in the user's filesystem, or
58: * <code>null</code> if not specified.
59: * @param sizeThreshold The threshold, in bytes, below which items will be
60: * retained in memory and above which they will be
61: * stored as a file.
62: * @param repository The data repository, which is the directory in
63: * which files will be created, should the item size
64: * exceed the threshold.
65: *
66: * @deprecated Use <code>DiskFileItem</code> instead.
67: */
68: public DefaultFileItem(String fieldName, String contentType,
69: boolean isFormField, String fileName, int sizeThreshold,
70: File repository) {
71: super(fieldName, contentType, isFormField, fileName,
72: sizeThreshold, repository);
73: }
74:
75: }
|