##### Coverage Report - org.apache.commons.fileupload.DefaultFileItem

Classes in this File | Line Coverage | Branch Coverage | Complexity
DefaultFileItem |
100% | 2/2
N/A | N/A
| 1.0;1

1 |  |
     /*
2 |  |
      * Licensed to the Apache Software Foundation (ASF) under one or more
3 |  |
      * contributor license agreements.  See the NOTICE file distributed with
4 |  |
      * this work for additional information regarding copyright ownership.
5 |  |
      * The ASF licenses this file to You under the Apache License, Version 2.0
6 |  |
      * (the "License"); you may not use this file except in compliance with
7 |  |
      * the License.  You may obtain a copy of the License at
8 |  |
      *
9 |  |
      *      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 |  |
      * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
36 |  |
      */
37 |  |
     @Deprecated
38 |  |
     public class DefaultFileItem
39 |  |
         extends DiskFileItem {
40 |  |
41 |  |
         // ----------------------------------------------------------- Constructors
42 |  |
43 |  |
         /**
44 |  |
          * Constructs a new <code>DefaultFileItem</code> instance.
45 |  |
          *
46 |  |
          * @param fieldName     The name of the form field.
47 |  |
          * @param contentType   The content type passed by the browser or
48 |  |
          *                      <code>null</code> if not specified.
49 |  |
          * @param isFormField   Whether or not this item is a plain form field, as
50 |  |
          *                      opposed to a file upload.
51 |  |
          * @param fileName      The original filename in the user's filesystem, or
52 |  |
          *                      <code>null</code> if not specified.
53 |  |
          * @param sizeThreshold The threshold, in bytes, below which items will be
54 |  |
          *                      retained in memory and above which they will be
55 |  |
          *                      stored as a file.
56 |  |
          * @param repository    The data repository, which is the directory in
57 |  |
          *                      which files will be created, should the item size
58 |  |
          *                      exceed the threshold.
59 |  |
          *
60 |  |
          * @deprecated 1.1 Use <code>DiskFileItem</code> instead.
61 |  |
          */
62 |  |
         @Deprecated
63 |  |
         public DefaultFileItem(String fieldName, String contentType,
64 |  |
                 boolean isFormField, String fileName, int sizeThreshold,
65 |  |
                 File repository) {
66 | 5 |
             super(fieldName, contentType, isFormField, fileName, sizeThreshold,
67 |  |
                     repository);
68 | 5 |
         }
69 |  |
70 |  |
     }