package com.twelvemonkeys.io; import java.io.IOException; import java.io.InputStream; /** * FastByteArrayOutputStreamTestCase *

* * @author Harald Kuhr * @author last modified by $Author: haku $ * @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/test/java/com/twelvemonkeys/io/FastByteArrayOutputStreamTestCase.java#1 $ */ public class FastByteArrayOutputStreamTestCase extends OutputStreamAbstractTestCase { protected FastByteArrayOutputStream makeObject() { return new FastByteArrayOutputStream(256); } public void testCreateInputStream() throws IOException { FastByteArrayOutputStream out = makeObject(); String hello = "Hello World"; out.write(hello.getBytes("UTF-8")); InputStream in = out.createInputStream(); byte[] read = FileUtil.read(in); assertEquals(hello, new String(read, "UTF-8")); } }