aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-11-14 12:55:46 +0000
committerJeremias Maerki <jeremias@apache.org>2005-11-14 12:55:46 +0000
commit18536029a6533a850dd1508f938b0ad20f1a0e72 (patch)
treece799e9527fc49e4bbb527c125920591b545c939 /test
parentf848d591de7458a04b111d243935b08bbd47c5fd (diff)
downloadxmlgraphics-fop-18536029a6533a850dd1508f938b0ad20f1a0e72.tar.gz
xmlgraphics-fop-18536029a6533a850dd1508f938b0ad20f1a0e72.zip
Updated from Jakarta Commons IO 1.0 to 1.1. CopyUtils.copy() becomes IOUtils.copy() again. CopyUtils in 1.0 was not ideal design decision.
Fixed most of the unappropriate System.err/System.out/Exception.printStackTrace(). Those that aren't fixed and are not legitimate calls (in main() methods etc.) are marked with a TODO item. Some Javadocs and style updates. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@344111 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java b/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java
index 0c1d2a02e..04033e913 100644
--- a/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java
+++ b/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import org.apache.commons.io.CopyUtils;
+import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.fop.pdf.PDFText;
@@ -34,8 +34,6 @@ import junit.framework.TestCase;
* ATTENTION: Some of the tests here depend on the correct behaviour of
* ASCII85OutputStream. If something fails here make sure
* ASCII85OutputStreamTestCase runs!
- *
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
*/
public class ASCII85InputStreamTestCase extends TestCase {
@@ -52,10 +50,7 @@ public class ASCII85InputStreamTestCase extends TestCase {
byte[] ascii85 = text.getBytes("US-ASCII");
InputStream in = new ByteArrayInputStream(ascii85);
InputStream decoder = new ASCII85InputStream(in);
- ByteArrayOutputStream baout = new ByteArrayOutputStream();
- CopyUtils.copy(decoder, baout);
- baout.close();
- return baout.toByteArray();
+ return IOUtils.toByteArray(decoder);
}
private byte[] getChunk(int count) {