From 18536029a6533a850dd1508f938b0ad20f1a0e72 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Mon, 14 Nov 2005 12:55:46 +0000 Subject: 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 --- test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'test') 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 Jeremias Maerki */ 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) { -- cgit v1.2.3