org.geotools.image.io.stream
Class UrlInputSpi

java.lang.Object
  extended by javax.imageio.spi.IIOServiceProvider
      extended by javax.imageio.spi.ImageInputStreamSpi
          extended by org.geotools.image.io.stream.UrlInputSpi
All Implemented Interfaces:
javax.imageio.spi.RegisterableService

public class UrlInputSpi
extends javax.imageio.spi.ImageInputStreamSpi

A service provider for ImageInputStream from URL connection.

Since:
2.4
Version:
$Id: UrlInputSpi.java 30679 2008-06-13 10:19:41Z acuster $
Author:
Martin Desruisseaux (IRD)

Field Summary
 
Fields inherited from class javax.imageio.spi.ImageInputStreamSpi
inputClass
 
Fields inherited from class javax.imageio.spi.IIOServiceProvider
vendorName, version
 
Constructor Summary
UrlInputSpi()
          Creates a new instance with no proxy.
UrlInputSpi(java.net.Proxy proxy)
          Creates a new instance with the specified proxy.
 
Method Summary
 javax.imageio.stream.ImageInputStream createInputStreamInstance(java.lang.Object input, boolean useCache, java.io.File cacheDir)
          Constructs an input stream for an URL.
 java.lang.String getDescription(java.util.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 javax.imageio.spi.ImageInputStreamSpi
canUseCacheFile, createInputStreamInstance, getInputClass
 
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

UrlInputSpi

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


UrlInputSpi

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

Since:
2.5
Method Detail

getDescription

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

Specified by:
getDescription in class javax.imageio.spi.IIOServiceProvider

needsCacheFile

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

Overrides:
needsCacheFile in class javax.imageio.spi.ImageInputStreamSpi

createInputStreamInstance

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

Specified by:
createInputStreamInstance in class javax.imageio.spi.ImageInputStreamSpi
Throws:
java.io.IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.