Examples of ImageInputStreamSpi


Examples of ae.javax.imageio.spi.ImageInputStreamSpi

        }

        boolean usecache = getUseCache() && hasCachePermission();

        while (iter.hasNext()) {
            ImageInputStreamSpi spi = (ImageInputStreamSpi)iter.next();
            if (spi.getInputClass().isInstance(input)) {
                try {
                    return spi.createInputStreamInstance(input,
                                                         usecache,
                                                         getCacheDirectory());
                } catch (IOException e) {
                    throw new IIOException("Can't create cache file!", e);
                }
View Full Code Here

Examples of com.google.code.appengine.imageio.spi.ImageInputStreamSpi

        }

        Iterator<ImageInputStreamSpi> it = registry.getServiceProviders(ImageInputStreamSpi.class, true);

        while (it.hasNext()) {
            ImageInputStreamSpi spi = it.next();
            if (spi.getInputClass().isInstance(input)) {
                return getUseCache() ?
                    spi.createInputStreamInstance(input, true, getCacheDirectory()) :
                    spi.createInputStreamInstance(input);
            }
        }
        return null;
    }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

public class needsCacheFile
  implements Testlet
{
  public void test(TestHarness h)
  {
    ImageInputStreamSpi sp;

    // Check #1: The default implementation must return false.
    sp = new TestProvider();
    h.check(sp.needsCacheFile() == false);
  }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

public class canUseCacheFile
  implements Testlet
{
  public void test(TestHarness h)
  {
    ImageInputStreamSpi sp;

    // Check #1: The default implementation must return false.
    sp = new TestProvider();
    h.check(sp.canUseCacheFile() == false);
  }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

        }

        boolean usecache = getUseCache() && hasCachePermission();

        while (iter.hasNext()) {
            ImageInputStreamSpi spi = (ImageInputStreamSpi)iter.next();
            if (spi.getInputClass().isInstance(input)) {
                try {
                    return spi.createInputStreamInstance(input,
                                                         usecache,
                                                         getCacheDirectory());
                } catch (IOException e) {
                    throw new IIOException("Can't create cache file!", e);
                }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

        }

        boolean usecache = getUseCache() && hasCachePermission();

        while (iter.hasNext()) {
            ImageInputStreamSpi spi = (ImageInputStreamSpi)iter.next();
            if (spi.getInputClass().isInstance(input)) {
                try {
                    return spi.createInputStreamInstance(input,
                                                         usecache,
                                                         getCacheDirectory());
                } catch (IOException e) {
                    throw new IIOException("Can't create cache file!", e);
                }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

        }

        boolean usecache = getUseCache() && hasCachePermission();

        while (iter.hasNext()) {
            ImageInputStreamSpi spi = (ImageInputStreamSpi)iter.next();
            if (spi.getInputClass().isInstance(input)) {
                try {
                    return spi.createInputStreamInstance(input,
                                                         usecache,
                                                         getCacheDirectory());
                } catch (IOException e) {
                    throw new IIOException("Can't create cache file!", e);
                }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

        }

        boolean usecache = getUseCache() && hasCachePermission();

        while (iter.hasNext()) {
            ImageInputStreamSpi spi = (ImageInputStreamSpi)iter.next();
            if (spi.getInputClass().isInstance(input)) {
                try {
                    return spi.createInputStreamInstance(input,
                                                         usecache,
                                                         getCacheDirectory());
                } catch (IOException e) {
                    throw new IIOException("Can't create cache file!", e);
                }
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

            return null;
        }
   
        boolean usecache = ImageIO.getUseCache();
   
        ImageInputStreamSpi spi = null;
        while (iter.hasNext()) {
            spi = (ImageInputStreamSpi) iter.next();
            if (spi.getInputClass().isInstance(input)) {
               
                // Stream creation check
                if (streamCreationCheck){
                    ImageInputStream stream = null;
                    try {
                        stream = spi.createInputStreamInstance(input, usecache, ImageIO.getCacheDirectory());
                        break;
                    } catch (IOException e) {
                        return null;
                    } finally {
                        //Make sure to close the created stream
View Full Code Here

Examples of javax.imageio.spi.ImageInputStreamSpi

        return readerSPI;
    }

    public static ImageInputStreamSpi getInputStreamSPIFromURL(URL granuleUrl) throws IOException {

        ImageInputStreamSpi streamSPI = ImageIOExt.getImageInputStreamSPI(granuleUrl, true);
        if (streamSPI == null) {
            final File file = DataUtilities.urlToFile(granuleUrl);
            if (file != null) {
                if (LOGGER.isLoggable(Level.WARNING)) {
                    LOGGER.log(Level.WARNING, Utils.getFileInfo(file));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.