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

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

public class StringImageInputStreamSpi
extends ImageInputStreamSpi

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

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
StringImageInputStreamSpi()
          Default constructor for a StringImageInputStreamSpi;
 
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

StringImageInputStreamSpi

public StringImageInputStreamSpi()
Default constructor for a StringImageInputStreamSpi;

Method Detail

createInputStreamInstance

public ImageInputStream createInputStreamInstance(Object input,
                                                  boolean useCache,
                                                  File cacheDir)
                                           throws IOException
Specified by:
createInputStreamInstance in class ImageInputStreamSpi
Throws:
IOException
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.