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

Object
  extended by IIOServiceProvider
      extended by ImageInputStreamSpi
          extended by 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 ImageInputStreamSpi
canUseCacheFile, createInputStreamInstance, getInputClass, needsCacheFile
 
Methods inherited from class IIOServiceProvider
getVendorName, getVersion, onDeregistration, onRegistration
 
Methods inherited from class 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-2010 GeoSolutions. All Rights Reserved.