org.geotoolkit.image.io.stream
Class UrlInputSpi

Object
  extended by IIOServiceProvider
      extended by ImageInputStreamSpi
          extended by UrlInputSpi
All Implemented Interfaces:
RegisterableService

public class UrlInputSpi
extends ImageInputStreamSpi

A service provider for creating ImageInputStreams from URLs.

Since:
2.4
Version:
3.00
Author:
Martin Desruisseaux (IRD)
Module:
coverage/geotk-coverageio (download)    View source code for this class

Field Summary
 
Fields inherited from class ImageInputStreamSpi
inputClass
 
Fields inherited from class IIOServiceProvider
vendorName, version
 
Constructor Summary
UrlInputSpi()
          Creates a new instance with no proxy.
UrlInputSpi(Proxy proxy)
          Creates a new instance with the specified proxy.
 
Method Summary
 ImageInputStream createInputStreamInstance(Object input, boolean useCache, File cacheDir)
          Constructs an input stream for an URL.
 String getDescription(Locale locale)
          Returns a brief, human-readable description of this service provider and its associated implementation.
 boolean needsCacheFile()
          Returns true since the input stream requires the use of a cache file.
 
Methods inherited from class ImageInputStreamSpi
canUseCacheFile, createInputStreamInstance, getInputClass
 
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

UrlInputSpi

public UrlInputSpi()
Creates a new instance with no proxy.


UrlInputSpi

public UrlInputSpi(Proxy proxy)
Creates a new instance with the specified proxy.

Parameters:
proxy - The proxy to use.
Since:
2.5
Method Detail

getDescription

public String getDescription(Locale locale)
Returns a brief, human-readable description of this service provider and its associated implementation.

Specified by:
getDescription in class IIOServiceProvider

needsCacheFile

public boolean needsCacheFile()
Returns true since the input stream requires the use of a cache file.

Overrides:
needsCacheFile in class ImageInputStreamSpi

createInputStreamInstance

public ImageInputStream createInputStreamInstance(Object input,
                                                  boolean useCache,
                                                  File cacheDir)
                                           throws IOException
Constructs an input stream for an URL.

Specified by:
createInputStreamInstance in class ImageInputStreamSpi
Throws:
IOException - If the stream can not be created.


Copyright © 2009-2013 Geotoolkit.org. All Rights Reserved.