public class

OutputStreamImageOutputStreamSpi

extends ImageOutputStreamSpi
java.lang.Object
   ↳ javax.imageio.spi.IIOServiceProvider
     ↳ javax.imageio.spi.ImageOutputStreamSpi
       ↳ com.sun.imageio.spi.OutputStreamImageOutputStreamSpi

Summary

[Expand]
Inherited Fields
From class javax.imageio.spi.ImageOutputStreamSpi
From class javax.imageio.spi.IIOServiceProvider
Public Constructors
OutputStreamImageOutputStreamSpi()
Public Methods
boolean canUseCacheFile()
Returns true if the ImageOutputStream implementation associated with this service provider can optionally make use of a cache File for improved performance and/or memory footrprint.
ImageOutputStream createOutputStreamInstance(Object output, boolean useCache, File cacheDir)
Returns an instance of the ImageOutputStream implementation associated with this service provider.
String getDescription(Locale locale)
Returns a brief, human-readable description of this service provider and its associated implementation.
boolean needsCacheFile()
Returns true if the ImageOutputStream implementation associated with this service provider requires the use of a cache File.
[Expand]
Inherited Methods
From class javax.imageio.spi.ImageOutputStreamSpi
From class javax.imageio.spi.IIOServiceProvider
From class java.lang.Object
From interface javax.imageio.spi.RegisterableService

Public Constructors

public OutputStreamImageOutputStreamSpi ()

Public Methods

public boolean canUseCacheFile ()

Returns true if the ImageOutputStream implementation associated with this service provider can optionally make use of a cache File for improved performance and/or memory footrprint. If false, the value of the cacheFile argument to createOutputStreamInstance will be ignored.

The default implementation returns false.

Returns
  • true if a cache file can be used by the output streams created by this service provider.

public ImageOutputStream createOutputStreamInstance (Object output, boolean useCache, File cacheDir)

Returns an instance of the ImageOutputStream implementation associated with this service provider. If the use of a cache file is optional, the useCache parameter will be consulted. Where a cache is required, or not applicable, the value of useCache will be ignored.

Parameters
output an object of the class type returned by getOutputClass.
useCache a boolean indicating whether a cache file should be used, in cases where it is optional.
cacheDir a File indicating where the cache file should be created, or null to use the system directory.
Returns
  • an ImageOutputStream instance.
Throws
IOException

public String getDescription (Locale locale)

Returns a brief, human-readable description of this service provider and its associated implementation. The resulting string should be localized for the supplied Locale, if possible.

Parameters
locale a Locale for which the return value should be localized.
Returns
  • a String containing a description of this service provider.

public boolean needsCacheFile ()

Returns true if the ImageOutputStream implementation associated with this service provider requires the use of a cache File.

The default implementation returns false.

Returns
  • true if a cache file is needed by the output streams created by this service provider.