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.jforum.util.legacy.commons.fileupload;
17:
18: import java.io.File;
19:
20: import net.jforum.util.legacy.commons.fileupload.disk.DiskFileItem;
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.3 2005/07/26 03:05:00 rafaelsteil Exp $
43: *
44: * @deprecated Use <code>DiskFileItem</code> instead.
45: */
46: public class DefaultFileItem extends DiskFileItem {
47:
48: // ----------------------------------------------------------- Constructors
49:
50: /**
51: * Constructs a new <code>DefaultFileItem</code> instance.
52: *
53: * @param fieldName The name of the form field.
54: * @param contentType The content type passed by the browser or
55: * <code>null</code> if not specified.
56: * @param isFormField Whether or not this item is a plain form field, as
57: * opposed to a file upload.
58: * @param fileName The original filename in the user's filesystem, or
59: * <code>null</code> if not specified.
60: * @param sizeThreshold The threshold, in bytes, below which items will be
61: * retained in memory and above which they will be
62: * stored as a file.
63: * @param repository The data repository, which is the directory in
64: * which files will be created, should the item size
65: * exceed the threshold.
66: *
67: * @deprecated Use <code>DiskFileItem</code> instead.
68: */
69: public DefaultFileItem(String fieldName, String contentType,
70: boolean isFormField, String fileName, int sizeThreshold,
71: File repository) {
72: super(fieldName, contentType, isFormField, fileName,
73: sizeThreshold, repository);
74: }
75:
76: }
|