1 7 8 package javax.imageio.spi; 9 10 import java.io.File ; 11 import java.io.IOException ; 12 import javax.imageio.stream.ImageOutputStream ; 13 14 39 public abstract class ImageOutputStreamSpi extends IIOServiceProvider { 40 41 45 protected Class <?> outputClass; 46 47 53 protected ImageOutputStreamSpi() { 54 } 55 56 71 public ImageOutputStreamSpi(String vendorName, 72 String version, 73 Class <?> outputClass) { 74 super(vendorName, version); 75 this.outputClass = outputClass; 76 } 77 78 93 public Class <?> getOutputClass() { 94 return outputClass; 95 } 96 97 110 public boolean canUseCacheFile() { 111 return false; 112 } 113 114 124 public boolean needsCacheFile() { 125 return false; 126 } 127 128 155 public abstract 156 ImageOutputStream createOutputStreamInstance(Object output, 157 boolean useCache, 158 File cacheDir) 159 throws IOException ; 160 161 179 public ImageOutputStream createOutputStreamInstance(Object output) 180 throws IOException { 181 return createOutputStreamInstance(output, true, null); 182 } 183 } 184 | Popular Tags |