1 19 package org.openide.util.io; 20 21 import java.io.IOException ; 22 import java.io.InputStream ; 23 24 25 29 public class NullInputStream extends InputStream { 30 34 public boolean throwException; 35 36 37 public NullInputStream() { 38 } 39 40 public int read() throws IOException { 41 if (throwException) { 42 throw new IOException (); 43 } 44 45 return -1; 46 } 47 } 48 | Popular Tags |