You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ma...@apache.org on 2005/11/28 07:36:39 UTC

svn commit: r349393 - in /jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload: disk/DiskFileItem.java portlet/PortletFileUpload.java portlet/PortletRequestContext.java servlet/ServletRequestContext.java

Author: martinc
Date: Sun Nov 27 22:36:35 2005
New Revision: 349393

URL: http://svn.apache.org/viewcvs?rev=349393&view=rev
Log:
More JavaDocs.

Modified:
    jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
    jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletFileUpload.java
    jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletRequestContext.java
    jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java

Modified: jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java?rev=349393&r1=349392&r2=349393&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java (original)
+++ jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/disk/DiskFileItem.java Sun Nov 27 22:36:35 2005
@@ -609,13 +609,11 @@
 
 
     /**
-
      * Returns a string representation of this object.
-
      */
     public String toString() {
         return "name=" + this.getName()
-            + ", StoreLocation=" 
+            + ", StoreLocation="
             + String.valueOf(this.getStoreLocation())
             + ", size="
             + this.getSize()
@@ -626,21 +624,14 @@
     }
 
 
-
     // -------------------------------------------------- Serialization methods
 
 
-
-
     /**
      * Writes the state of this object during serialization.
-
      *
-
      * @param out The stream to which the state should be written.
-
      *
-
      * @throws IOException if an error occurs.
      */
     private void writeObject(ObjectOutputStream out) throws IOException {
@@ -658,21 +649,17 @@
 
     /**
      * Reads the state of this object during deserialization.
-
      *
-
      * @param in The stream from which the state should be read.
      *
-
      * @throws IOException if an error occurs.
      * @throws ClassNotFoundException if class cannot be found.
      */
     private void readObject(ObjectInputStream in)
-
             throws IOException, ClassNotFoundException {
         // read values
         in.defaultReadObject();
-        
+
         OutputStream output = getOutputStream();
         if (cachedContent != null) {
             output.write(cachedContent);

Modified: jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletFileUpload.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletFileUpload.java?rev=349393&r1=349392&r2=349393&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletFileUpload.java (original)
+++ jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletFileUpload.java Sun Nov 27 22:36:35 2005
@@ -96,6 +96,18 @@
     // --------------------------------------------------------- Public methods
 
 
+    /**
+     * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
+     * compliant <code>multipart/form-data</code> stream.
+     *
+     * @param request The portlet request to be parsed.
+     *
+     * @return A list of <code>FileItem</code> instances parsed from the
+     *         request, in the order that they were transmitted.
+     *
+     * @throws FileUploadException if there are problems reading/parsing
+     *                             the request or storing files.
+     */
     public List /* FileItem */ parseRequest(ActionRequest request)
             throws FileUploadException {
         return parseRequest(new PortletRequestContext(request));

Modified: jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletRequestContext.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletRequestContext.java?rev=349393&r1=349392&r2=349393&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletRequestContext.java (original)
+++ jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/portlet/PortletRequestContext.java Sun Nov 27 22:36:35 2005
@@ -44,6 +44,8 @@
 
     /**
      * Construct a context for this request.
+     *
+     * @param request The request to which this context applies.
      */
     public PortletRequestContext(ActionRequest request) {
         this.request = request;
@@ -89,9 +91,14 @@
     public InputStream getInputStream() throws IOException {
         return request.getPortletInputStream();
     }
-    
+
+    /**
+     * Returns a string representation of this object.
+     *
+     * @return a string representation of this object.
+     */
     public String toString() {
-        return "ContentLength=" 
+        return "ContentLength="
             + this.getContentLength()
             + ", ContentType="
             + this.getContentType();

Modified: jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java?rev=349393&r1=349392&r2=349393&view=diff
==============================================================================
--- jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java (original)
+++ jakarta/commons/proper/fileupload/trunk/src/java/org/apache/commons/fileupload/servlet/ServletRequestContext.java Sun Nov 27 22:36:35 2005
@@ -91,9 +91,14 @@
     public InputStream getInputStream() throws IOException {
         return request.getInputStream();
     }
-    
+
+    /**
+     * Returns a string representation of this object.
+     *
+     * @return a string representation of this object.
+     */
     public String toString() {
-        return "ContentLength=" 
+        return "ContentLength="
             + this.getContentLength()
             + ", ContentType="
             + this.getContentType();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org