commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcna...@apache.org
Subject cvs commit: jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload DefaultFileItem.java
Date Fri, 05 Apr 2002 22:29:22 GMT
jmcnally    02/04/05 14:29:22

  Modified:    fileupload/src/java/org/apache/commons/fileupload
                        DefaultFileItem.java
  Log:
  patch by Will Glass-Husain" <wglass@forio.com> to use an
  output stream instead of writer.
  
  Revision  Changes    Path
  1.2       +6 -6      jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/DefaultFileItem.java
  
  Index: DefaultFileItem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/fileupload/src/java/org/apache/commons/fileupload/DefaultFileItem.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultFileItem.java	24 Mar 2002 07:05:13 -0000	1.1
  +++ DefaultFileItem.java	5 Apr 2002 22:29:22 -0000	1.2
  @@ -91,7 +91,7 @@
    * @author <a href="mailto:sean@informage.net">Sean Legassick</a>
    * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
    * @author <a href="mailto:jmcnally@apache.org">John McNally</a>
  - * @version $Id: DefaultFileItem.java,v 1.1 2002/03/24 07:05:13 jmcnally Exp $
  + * @version $Id: DefaultFileItem.java,v 1.2 2002/04/05 22:29:22 jmcnally Exp $
    */
   public class DefaultFileItem
       implements FileItem
  @@ -415,17 +415,17 @@
       {
           if (inMemory())
           {
  -            FileWriter writer = null;
  +            FileOutputStream fout = null;
               try
               {
  -                writer = new FileWriter(file);
  -                writer.write(getString());
  +                fout = new FileOutputStream(file);
  +                fout.write(get());
               }
               finally
               {
  -                if (writer != null)
  +                if (fout != null)
                   {
  -                    writer.close();
  +                    fout.close();
                   }
               }
           }
  
  
  

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


Mime
View raw message