01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.commons.fileupload;
18:
19: import java.io.File;
20: import org.apache.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 479262 2006-11-26 03:09:24Z niallp $
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: }
|