it.geosolutions.imageio.stream.input.spi
Class URLImageInputStreamSpi

java.lang.Object
  extended by javax.imageio.spi.IIOServiceProvider
      extended by javax.imageio.spi.ImageInputStreamSpi
          extended by it.geosolutions.imageio.stream.input.spi.URLImageInputStreamSpi
All Implemented Interfaces:
RegisterableService

public class URLImageInputStreamSpi
extends ImageInputStreamSpi

Implementation of an ImageInputStreamSpi for instantiating an ImageInputStream capable of connecting to a URL.

I basically rely on the existence of something to read from a File in case this URL points to a File, otherwise I try to open up an InputStream and I ask the ImageIO.createImageInputStream(Object) to create an ImageInputStream for it.

Author:
Simone Giannecchini, GeoSolutions
See Also:
ImageInputStream, ImageInputStreamSpi, ImageIO.createImageInputStream(Object)

Constructor Summary
URLImageInputStreamSpi()
          Default constructor for a URLImageInputStreamSpi;
 
Method Summary
 ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir)
           
 String getDescription(Locale locale)
           
 
Methods inherited from class javax.imageio.spi.ImageInputStreamSpi
canUseCacheFile, createInputStreamInstance, getInputClass, needsCacheFile
 
Methods inherited from class javax.imageio.spi.IIOServiceProvider
getVendorName, getVersion, onDeregistration, onRegistration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLImageInputStreamSpi

public URLImageInputStreamSpi()
Default constructor for a URLImageInputStreamSpi;

Method Detail

createInputStreamInstance

public ImageInputStream createInputStreamInstance(Object input,
                                                  boolean useCache,
                                                  File cacheDir)
Specified by:
createInputStreamInstance in class ImageInputStreamSpi
See Also:
ImageInputStreamSpi.createInputStreamInstance(java.lang.Object, boolean, java.io.File)

getDescription

public String getDescription(Locale locale)
Specified by:
getDescription in class IIOServiceProvider
See Also:
IIOServiceProvider.getDescription(Locale).


Copyright © 2006–2014 GeoSolutions. All rights reserved.