cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r356212 - in /cocoon/branches/BRANCH_2_1_X: legal/ lib/ lib/core/ src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/ src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/ src/java/org/apache/cocoon/components/flo...
Date Mon, 12 Dec 2005 08:23:04 GMT
Author: antonio
Date: Mon Dec 12 00:22:45 2005
New Revision: 356212

URL: http://svn.apache.org/viewcvs?rev=356212&view=rev
Log:
Replace deprecated library excalibur-io 1.1 with commons-io 1.1.

Added:
    cocoon/branches/BRANCH_2_1_X/legal/commons-io-1.1.jar.license.txt
      - copied unchanged from r356186, cocoon/branches/BRANCH_2_1_X/legal/commons-digester-1.7.jar.license.txt
    cocoon/branches/BRANCH_2_1_X/lib/core/commons-io-1.1.jar   (with props)
Removed:
    cocoon/branches/BRANCH_2_1_X/legal/excalibur-io-1.1.jar.license.txt
    cocoon/branches/BRANCH_2_1_X/lib/core/excalibur-io-1.1.jar
Modified:
    cocoon/branches/BRANCH_2_1_X/lib/jars.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/BasketManagerImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/WebDAVRepository.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/Part.java

Added: cocoon/branches/BRANCH_2_1_X/lib/core/commons-io-1.1.jar
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/lib/core/commons-io-1.1.jar?rev=356212&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cocoon/branches/BRANCH_2_1_X/lib/core/commons-io-1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: cocoon/branches/BRANCH_2_1_X/lib/jars.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/lib/jars.xml?rev=356212&r1=356211&r2=356212&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/lib/jars.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/lib/jars.xml Mon Dec 12 00:22:45 2005
@@ -123,7 +123,7 @@
     <homepage>http://excalibur.apache.org/</homepage>
   </file>
 
-  <file>
+<!--  <file>
     <title>Excalibur IO</title>
     <description>
       Part of Excalibur, it is a set of classes and patterns that
@@ -132,7 +132,7 @@
     <used-by>Cocoon</used-by>
     <lib>core/excalibur-io-1.1.jar</lib>
     <homepage>http://excalibur.apache.org/</homepage>
-  </file>
+  </file>-->
 
   <file>
     <title>Excalibur Logger</title>
@@ -382,6 +382,16 @@
     <used-by>DELI (deli block)</used-by>
     <lib>optional/deli-x050330.jar</lib>
     <homepage>http://delicon.sourceforge.net</homepage>
+  </file>
+
+  <file>
+    <title>Jakarta Commons IO</title>
+    <description>
+      Commons IO is a library of utilities to assist with developing IO functionality.
+    </description>
+    <used-by>Cocoon</used-by>
+    <lib>core/commons-io-1.1.jar</lib>
+    <homepage>http://jakarta.apache.org/commons/io/</homepage>
   </file>
 
   <file>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/BasketManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/BasketManagerImpl.java?rev=356212&r1=356211&r2=356212&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/BasketManagerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/coplets/basket/BasketManagerImpl.java
Mon Dec 12 00:22:45 2005
@@ -29,7 +29,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.avalon.excalibur.io.IOUtil;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.component.Component;
@@ -70,6 +69,7 @@
 import org.apache.cocoon.servlet.multipart.Part;
 import org.apache.cocoon.servlet.multipart.PartOnDisk;
 import org.apache.cocoon.util.ClassUtils;
+import org.apache.commons.io.IOUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 
@@ -234,7 +234,7 @@
             if ( o != null && o instanceof Part) {
                 final Part file = (Part)o;
                 try {
-                    byte[] c = IOUtil.toByteArray(file.getInputStream());
+                    byte[] c = IOUtils.toByteArray(file.getInputStream());
                     ContentItem ci = new ContentItem(file.getFileName(), true);
                     ci.setContent(c);
                     store.addItem(ci);
@@ -276,7 +276,7 @@
                             source = resolver.resolveURI(url);
                             CopletData copletData = service.getComponentManager().getProfileManager().getCopletData(event.getCopletDataId());
                             cid = service.getComponentManager().getCopletFactory().newInstance(copletData);
-                            cid.setAttribute("item-content", IOUtil.toByteArray(source.getInputStream()));
+                            cid.setAttribute("item-content", IOUtils.toByteArray(source.getInputStream()));
                         } catch (IOException se) {
                             this.getLogger().warn("Unable to get content for " + url, se);
                         } catch (ServiceException se) {
@@ -417,7 +417,7 @@
                         }
                         }
                         source = resolver.resolveURI(url);
-                        ci.setContent(IOUtil.toByteArray(source.getInputStream()));
+                        ci.setContent(IOUtils.toByteArray(source.getInputStream()));
                     } catch (IOException se) {
                         this.getLogger().warn("Unable to get content for " + url, se);
                     } catch (ServiceException se) {

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/WebDAVRepository.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/WebDAVRepository.java?rev=356212&r1=356211&r2=356212&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/WebDAVRepository.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/webdav/java/org/apache/cocoon/components/repository/impl/WebDAVRepository.java
Mon Dec 12 00:22:45 2005
@@ -23,7 +23,6 @@
 
 import javax.xml.transform.OutputKeys;
 
-import org.apache.avalon.excalibur.io.IOUtil;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.activity.Initializable;
 import org.apache.avalon.framework.component.Component;
@@ -44,6 +43,7 @@
 import org.apache.cocoon.components.webdav.WebDAVUtil;
 import org.apache.cocoon.xml.XMLUtils;
 import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.io.IOUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.xml.dom.DOMParser;
 import org.apache.webdav.lib.WebdavResource;
@@ -134,7 +134,7 @@
     public String getContentString(String uri) throws ProcessingException {
 
         try {
-            return IOUtil.toString(this.getContentStream(uri));
+            return IOUtils.toString(this.getContentStream(uri));
 
         } catch (IOException ioe) {
             throw new ProcessingException ("Error loading resource: " + this.repoBaseUrl
+ uri, ioe);
@@ -233,7 +233,7 @@
     public boolean saveContent(String uri, Source source) {
 
         try {
-            return this.saveContent(uri, IOUtil.toString(source.getInputStream()));
+            return this.saveContent(uri, IOUtils.toString(source.getInputStream()));
 
         } catch (IOException ioe) {
             this.getLogger().error("Error saving source: " + source.getURI() +

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java?rev=356212&r1=356211&r2=356212&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/util/PipelineUtil.java
Mon Dec 12 00:22:45 2005
@@ -20,7 +20,6 @@
 import java.io.OutputStream;
 import java.util.Map;
 
-import org.apache.avalon.excalibur.io.IOUtil;
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.ContextException;
@@ -32,6 +31,7 @@
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.FlowHelper;
 import org.apache.cocoon.components.source.SourceUtil;
+import org.apache.commons.io.IOUtils;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
 import org.w3c.dom.Document;
@@ -108,7 +108,7 @@
         try {
             src = this.resolver.resolveURI("cocoon:/" + uri);
             input = src.getInputStream();
-            IOUtil.copy(input, output);
+            IOUtils.copy(input, output);
         } finally {
             if (input != null) {
                 try {

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/Part.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/Part.java?rev=356212&r1=356211&r2=356212&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/Part.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/multipart/Part.java Mon
Dec 12 00:22:45 2005
@@ -21,8 +21,8 @@
 import java.io.OutputStream;
 import java.util.Map;
 
-import org.apache.avalon.excalibur.io.IOUtil;
 import org.apache.avalon.framework.activity.Disposable;
+import org.apache.commons.io.IOUtils;
 import org.apache.excalibur.source.ModifiableSource;
 
 
@@ -125,7 +125,7 @@
     public void copyToSource(ModifiableSource source) throws IOException {
         InputStream is = getInputStream();
         OutputStream os = source.getOutputStream();
-        IOUtil.copy(is, os);
+        IOUtils.copy(is, os);
         is.close();
         os.close();
     }
@@ -140,7 +140,7 @@
     public void copyToFile(String filename) throws IOException {
         InputStream is = getInputStream();
         OutputStream os = new FileOutputStream(filename);
-        IOUtil.copy(is, os);
+        IOUtils.copy(is, os);
         is.close();
         os.close();
     }



Mime
View raw message