Author: veithen
Date: Mon Mar 11 11:47:19 2013
New Revision: 1455100

URL: http://svn.apache.org/r1455100
Log:
Eliminated usage of deprecated Axiom class.

Modified:
    
axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java

Modified: 
axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java?rev=1455100&r1=1455099&r2=1455100&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentTest.java
 Mon Mar 11 11:47:19 2013
@@ -20,7 +20,6 @@
 package org.apache.axis2.saaj;
 
 import junit.framework.Assert;
-import org.apache.axiom.attachments.utils.IOUtils;
 import org.apache.axiom.util.base64.Base64Utils;
 import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
 import org.apache.commons.httpclient.HttpClient;
@@ -28,6 +27,7 @@ import org.apache.commons.httpclient.Htt
 import org.apache.commons.httpclient.HttpStatus;
 import org.apache.commons.httpclient.methods.GetMethod;
 import org.apache.commons.httpclient.params.HttpMethodParams;
+import org.apache.commons.io.IOUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -277,7 +277,7 @@ public class AttachmentTest extends Asse
             //Create InputStream from DataHandler's InputStream
             InputStream is = dh.getInputStream();
 
-            byte buf[] = IOUtils.getStreamAsByteArray(is);
+            byte buf[] = IOUtils.toByteArray(is);
             //Setting Content via InputStream for image/jpeg mime type
             ByteArrayOutputStream bos = new ByteArrayOutputStream();
             Base64Utils.encode(buf, 0, buf.length, bos);


Reply via email to