1 16 17 18 package org.apache.commons.io.output; 19 20 21 import java.io.IOException ; 22 23 import junit.framework.TestCase; 24 25 26 33 34 public class NullOutputStreamTest extends TestCase { 35 36 public NullOutputStreamTest(String name) { 37 super(name); 38 } 39 40 public void testNull() throws IOException { 41 NullOutputStream nos = new NullOutputStream(); 42 nos.write("string".getBytes()); 43 nos.write("some string".getBytes(), 3, 5); 44 nos.write(1); 45 nos.write(0x0f); 46 nos.flush(); 47 nos.close(); 48 nos.write("allowed".getBytes()); 49 nos.write(255); 50 } 51 52 } 53 | Popular Tags |