Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 32AFC200CA6 for ; Tue, 13 Jun 2017 14:48:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 31228160BF3; Tue, 13 Jun 2017 12:48:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DC8B4160BEB for ; Tue, 13 Jun 2017 14:48:49 +0200 (CEST) Received: (qmail 61182 invoked by uid 500); 13 Jun 2017 12:48:49 -0000 Mailing-List: contact notifications-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list notifications@commons.apache.org Received: (qmail 61063 invoked by uid 99); 13 Jun 2017 12:48:46 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2017 12:48:46 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 81DE13A259F for ; Tue, 13 Jun 2017 12:48:44 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1013974 [4/43] - in /websites/production/commons/content/proper/commons-fileupload/javadocs: ./ api-release/ api-release/org/ api-release/org/apache/ api-release/org/apache/commons/ api-release/org/apache/commons/fileupload/ api-release/or... Date: Tue, 13 Jun 2017 12:48:40 -0000 To: notifications@commons.apache.org From: chtompki@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170613124844.81DE13A259F@svn01-us-west.apache.org> archived-at: Tue, 13 Jun 2017 12:48:52 -0000 Added: websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItem.html ============================================================================== --- websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItem.html (added) +++ websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItem.html Tue Jun 13 12:48:38 2017 @@ -0,0 +1,607 @@ + + + + + + +FileItem (Apache Commons FileUpload 1.3.3 API) + + + + + + + + + + + +
+
org.apache.commons.fileupload
+

Interface FileItem

+
+
+
+
    +
  • +
    +
    All Superinterfaces:
    +
    FileItemHeadersSupport, Serializable
    +
    +
    +
    All Known Implementing Classes:
    +
    DefaultFileItem, DiskFileItem
    +
    +
    +
    +
    public interface FileItem
    +extends Serializable, FileItemHeadersSupport
    +

    This class represents a file or form item that was received within a + multipart/form-data POST request. + +

    After retrieving an instance of this class from a FileUpload instance (see + #parseRequest(javax.servlet.http.HttpServletRequest)), you may + either request all contents of the file at once using get() or + request an InputStream with + getInputStream() and process the file without attempting to load + it into memory, which may come handy with large files. + +

    While this interface does not extend + javax.activation.DataSource per se (to avoid a seldom used + dependency), several of the defined methods are specifically defined with + the same signatures as methods in that interface. This allows an + implementation of this interface to also implement + javax.activation.DataSource with minimal additional work.

    +
    +
    Since:
    +
    1.3 additionally implements FileItemHeadersSupport
    +
    Version:
    +
    $Id$
    +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Summary

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethod and Description
      voiddelete() +
      Deletes the underlying storage for a file item, including deleting any + associated temporary disk file.
      +
      byte[]get() +
      Returns the contents of the file item as an array of bytes.
      +
      StringgetContentType() +
      Returns the content type passed by the browser or null if + not defined.
      +
      StringgetFieldName() +
      Returns the name of the field in the multipart form corresponding to + this file item.
      +
      InputStreamgetInputStream() +
      Returns an InputStream that can be + used to retrieve the contents of the file.
      +
      StringgetName() +
      Returns the original filename in the client's filesystem, as provided by + the browser (or other client software).
      +
      OutputStreamgetOutputStream() +
      Returns an OutputStream that can + be used for storing the contents of the file.
      +
      longgetSize() +
      Returns the size of the file item.
      +
      StringgetString() +
      Returns the contents of the file item as a String, using the default + character encoding.
      +
      StringgetString(String encoding) +
      Returns the contents of the file item as a String, using the specified + encoding.
      +
      booleanisFormField() +
      Determines whether or not a FileItem instance represents + a simple form field.
      +
      booleanisInMemory() +
      Provides a hint as to whether or not the file contents will be read + from memory.
      +
      voidsetFieldName(String name) +
      Sets the field name used to reference this file item.
      +
      voidsetFormField(boolean state) +
      Specifies whether or not a FileItem instance represents + a simple form field.
      +
      voidwrite(File file) +
      A convenience method to write an uploaded item to disk.
      +
      + +
    • +
    +
  • +
+
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        getContentType

        +
        String getContentType()
        +
        Returns the content type passed by the browser or null if + not defined.
        +
        +
        Returns:
        +
        The content type passed by the browser or null if + not defined.
        +
        +
      • +
      + + + +
        +
      • +

        getName

        +
        String getName()
        +
        Returns the original filename in the client's filesystem, as provided by + the browser (or other client software). In most cases, this will be the + base file name, without path information. However, some clients, such as + the Opera browser, do include path information.
        +
        +
        Returns:
        +
        The original filename in the client's filesystem.
        +
        Throws:
        +
        InvalidFileNameException - The file name contains a NUL character, + which might be an indicator of a security attack. If you intend to + use the file name anyways, catch the exception and use + InvalidFileNameException#getName().
        +
        +
      • +
      + + + +
        +
      • +

        isInMemory

        +
        boolean isInMemory()
        +
        Provides a hint as to whether or not the file contents will be read + from memory.
        +
        +
        Returns:
        +
        true if the file contents will be read from memory; + false otherwise.
        +
        +
      • +
      + + + +
        +
      • +

        getSize

        +
        long getSize()
        +
        Returns the size of the file item.
        +
        +
        Returns:
        +
        The size of the file item, in bytes.
        +
        +
      • +
      + + + +
        +
      • +

        get

        +
        byte[] get()
        +
        Returns the contents of the file item as an array of bytes.
        +
        +
        Returns:
        +
        The contents of the file item as an array of bytes.
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        String getString(String encoding)
        +          throws UnsupportedEncodingException
        +
        Returns the contents of the file item as a String, using the specified + encoding. This method uses get() to retrieve the + contents of the item.
        +
        +
        Parameters:
        +
        encoding - The character encoding to use.
        +
        Returns:
        +
        The contents of the item, as a string.
        +
        Throws:
        +
        UnsupportedEncodingException - if the requested character + encoding is not available.
        +
        +
      • +
      + + + +
        +
      • +

        getString

        +
        String getString()
        +
        Returns the contents of the file item as a String, using the default + character encoding. This method uses get() to retrieve the + contents of the item.
        +
        +
        Returns:
        +
        The contents of the item, as a string.
        +
        +
      • +
      + + + +
        +
      • +

        write

        +
        void write(File file)
        +    throws Exception
        +
        A convenience method to write an uploaded item to disk. The client code + is not concerned with whether or not the item is stored in memory, or on + disk in a temporary location. They just want to write the uploaded item + to a file. +

        + This method is not guaranteed to succeed if called more than once for + the same item. This allows a particular implementation to use, for + example, file renaming, where possible, rather than copying all of the + underlying data, thus gaining a significant performance benefit.

        +
        +
        Parameters:
        +
        file - The File into which the uploaded item should + be stored.
        +
        Throws:
        +
        Exception - if an error occurs.
        +
        +
      • +
      + + + +
        +
      • +

        delete

        +
        void delete()
        +
        Deletes the underlying storage for a file item, including deleting any + associated temporary disk file. Although this storage will be deleted + automatically when the FileItem instance is garbage + collected, this method can be used to ensure that this is done at an + earlier time, thus preserving system resources.
        +
      • +
      + + + +
        +
      • +

        getFieldName

        +
        String getFieldName()
        +
        Returns the name of the field in the multipart form corresponding to + this file item.
        +
        +
        Returns:
        +
        The name of the form field.
        +
        +
      • +
      + + + +
        +
      • +

        setFieldName

        +
        void setFieldName(String name)
        +
        Sets the field name used to reference this file item.
        +
        +
        Parameters:
        +
        name - The name of the form field.
        +
        +
      • +
      + + + +
        +
      • +

        isFormField

        +
        boolean isFormField()
        +
        Determines whether or not a FileItem instance represents + a simple form field.
        +
        +
        Returns:
        +
        true if the instance represents a simple form + field; false if it represents an uploaded file.
        +
        +
      • +
      + + + +
        +
      • +

        setFormField

        +
        void setFormField(boolean state)
        +
        Specifies whether or not a FileItem instance represents + a simple form field.
        +
        +
        Parameters:
        +
        state - true if the instance represents a simple form + field; false if it represents an uploaded file.
        +
        +
      • +
      + + + + +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.

+ + Added: websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemFactory.html ============================================================================== --- websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemFactory.html (added) +++ websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemFactory.html Tue Jun 13 12:48:38 2017 @@ -0,0 +1,255 @@ + + + + + + +FileItemFactory (Apache Commons FileUpload 1.3.3 API) + + + + + + + + + + + +
+
org.apache.commons.fileupload
+

Interface FileItemFactory

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    DefaultFileItemFactory, DiskFileItemFactory
    +
    +
    +
    +
    public interface FileItemFactory
    +

    A factory interface for creating FileItem instances. Factories + can provide their own custom configuration, over and above that provided + by the default file upload implementation.

    +
    +
    Version:
    +
    $Id$
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        createItem

        +
        FileItem createItem(String fieldName,
        +                    String contentType,
        +                    boolean isFormField,
        +                    String fileName)
        +
        Create a new FileItem instance from the supplied parameters and + any local factory configuration.
        +
        +
        Parameters:
        +
        fieldName - The name of the form field.
        +
        contentType - The content type of the form field.
        +
        isFormField - true if this is a plain form field; + false otherwise.
        +
        fileName - The name of the uploaded file, if any, as supplied + by the browser or other client.
        +
        Returns:
        +
        The newly created file item.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.

+ + Added: websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeaders.html ============================================================================== --- websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeaders.html (added) +++ websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeaders.html Tue Jun 13 12:48:38 2017 @@ -0,0 +1,310 @@ + + + + + + +FileItemHeaders (Apache Commons FileUpload 1.3.3 API) + + + + + + + + + + + +
+
org.apache.commons.fileupload
+

Interface FileItemHeaders

+
+
+
+
    +
  • +
    +
    All Known Implementing Classes:
    +
    FileItemHeadersImpl
    +
    +
    +
    +
    public interface FileItemHeaders
    +

    This class provides support for accessing the headers for a file or form + item that was received within a multipart/form-data POST + request.

    +
    +
    Since:
    +
    1.2.1
    +
    Version:
    +
    $Id$
    +
    +
  • +
+
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + +
        +
      • +

        getHeader

        +
        String getHeader(String name)
        +
        Returns the value of the specified part header as a String. + + If the part did not include a header of the specified name, this method + return null. If there are multiple headers with the same + name, this method returns the first header in the item. The header + name is case insensitive.
        +
        +
        Parameters:
        +
        name - a String specifying the header name
        +
        Returns:
        +
        a String containing the value of the requested + header, or null if the item does not have a header + of that name
        +
        +
      • +
      + + + +
        +
      • +

        getHeaders

        +
        Iterator<StringgetHeaders(String name)
        +

        + Returns all the values of the specified item header as an + Iterator of String objects. +

        +

        + If the item did not include any headers of the specified name, this + method returns an empty Iterator. The header name is + case insensitive. +

        +
        +
        Parameters:
        +
        name - a String specifying the header name
        +
        Returns:
        +
        an Iterator containing the values of the + requested header. If the item does not have any headers of + that name, return an empty Iterator
        +
        +
      • +
      + + + +
        +
      • +

        getHeaderNames

        +
        Iterator<StringgetHeaderNames()
        +

        + Returns an Iterator of all the header names. +

        +
        +
        Returns:
        +
        an Iterator containing all of the names of + headers provided with this file item. If the item does not have + any headers return an empty Iterator
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.

+ + Added: websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeadersSupport.html ============================================================================== --- websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeadersSupport.html (added) +++ websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemHeadersSupport.html Tue Jun 13 12:48:38 2017 @@ -0,0 +1,272 @@ + + + + + + +FileItemHeadersSupport (Apache Commons FileUpload 1.3.3 API) + + + + + + + + + + + +
+
org.apache.commons.fileupload
+

Interface FileItemHeadersSupport

+
+
+
+ +
+
+ +
+
+
    +
  • + +
      +
    • + + +

      Method Detail

      + + + + + + + +
        +
      • +

        setHeaders

        +
        void setHeaders(FileItemHeaders headers)
        +
        Sets the headers read from within an item. Implementations of + FileItem or FileItemStream should implement this + interface to be able to get the raw headers found within the item + header block.
        +
        +
        Parameters:
        +
        headers - the instance that holds onto the headers + for this instance.
        +
        +
      • +
      +
    • +
    +
  • +
+
+
+ + + + + +

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.

+ + Added: websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemIterator.html ============================================================================== --- websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemIterator.html (added) +++ websites/production/commons/content/proper/commons-fileupload/javadocs/api-release/org/apache/commons/fileupload/FileItemIterator.html Tue Jun 13 12:48:38 2017 @@ -0,0 +1,273 @@ + + + + + + +FileItemIterator (Apache Commons FileUpload 1.3.3 API) + + + + + + + + + + + +
+
org.apache.commons.fileupload
+

Interface FileItemIterator

+
+
+
+ +
+
+ +
+
+ +
+
+ + + + + +

Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.

+ +