1 7 8 package javax.imageio.spi; 9 10 import java.io.File ; 11 import java.io.IOException ; 12 import javax.imageio.stream.ImageInputStream ; 13 14 38 public abstract class ImageInputStreamSpi extends IIOServiceProvider { 39 40 44 protected Class <?> inputClass; 45 46 52 protected ImageInputStreamSpi() { 53 } 54 55 70 public ImageInputStreamSpi(String vendorName, 71 String version, 72 Class <?> inputClass) { 73 super(vendorName, version); 74 this.inputClass = inputClass; 75 } 76 77 91 public Class <?> getInputClass() { 92 return inputClass; 93 } 94 95 108 public boolean canUseCacheFile() { 109 return false; 110 } 111 112 124 public boolean needsCacheFile() { 125 return false; 126 } 127 128 157 public abstract ImageInputStream 158 createInputStreamInstance(Object input, 159 boolean useCache, 160 File cacheDir) throws IOException ; 161 162 180 public ImageInputStream createInputStreamInstance(Object input) 181 throws IOException { 182 return createInputStreamInstance(input, true, null); 183 } 184 } 185 | Popular Tags |