javax.media.jai.tilecodec
Class GZIPTileCodecDescriptor

java.lang.Object
  extended byjavax.media.jai.tilecodec.TileCodecDescriptorImpl
      extended byjavax.media.jai.tilecodec.GZIPTileCodecDescriptor
All Implemented Interfaces:
RegistryElementDescriptor, TileCodecDescriptor

public class GZIPTileCodecDescriptor
extends TileCodecDescriptorImpl

This class is the descriptor for the "GZIP" tile codec. This codec scheme uses "gzip" as the method of compressing tile data. This is a lossless tile codec. The format name for the gzip tile codec is "gzip". The encoded stream contains the SampleModel and the tile's upper left corner position, thus the includesSampleModelInfo() and includesLocationInfo() methods in this descriptor return true.

The "gzip" codec scheme does not support any parameters.

Resource List
Name Value
Vendor com.sun.media.jai
Description A descriptor to describe the lossless "gzip" codec scheme.
DocURL http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/tilecodec/GZIPTileCodecDescriptor.html
Version 1.2

Parameter List
Name Class Type Default Value

Since:
JAI 1.1

Constructor Summary
GZIPTileCodecDescriptor()
          Creates a GZIPTileCodecDescriptor
 
Method Summary
 TileCodecParameterList getCompatibleParameters(String modeName, TileCodecParameterList otherParamList)
          Returns a TileCodecParameterList valid for the specified modeName and compatible with the supplied TileCodecParameterList.
 TileCodecParameterList getDefaultParameters(String modeName)
          Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList.
 TileCodecParameterList getDefaultParameters(String modeName, SampleModel sm)
          Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList, adding a "sampleModel" parameter with the specified value to the parameter list.
 ParameterListDescriptor getParameterListDescriptor(String modeName)
          Returns the ParameterListDescriptor that describes the associated parameters (NOT sources).
 
Methods inherited from class javax.media.jai.tilecodec.TileCodecDescriptorImpl
arePropertiesSupported, getName, getPropertyGenerators, getSupportedModes, includesLocationInfo, includesSampleModelInfo, isModeSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GZIPTileCodecDescriptor

public GZIPTileCodecDescriptor()
Creates a GZIPTileCodecDescriptor

Method Detail

getCompatibleParameters

public TileCodecParameterList getCompatibleParameters(String modeName,
                                                      TileCodecParameterList otherParamList)
Returns a TileCodecParameterList valid for the specified modeName and compatible with the supplied TileCodecParameterList. For example, given a TileCodecParameterList used to encode a tile with the modeName being specified as "tileDecoder", this method will return a TileCodecParameterList sufficient to decode that same tile. For the gzip tile codec, no parameters are used. So null will be returned for any valid modeName specified.

Parameters:
modeName - The registry mode to return a valid parameter list for.
otherParamList - The parameter list for which a compatible parameter list for the complementary modeName is to be found.
Throws:
IllegalArgumentException - if modeName is null.
IllegalArgumentException - if modeName is not one of the modes valid for this descriptor, i.e those returned from the getSupportedNames() method.

getDefaultParameters

public TileCodecParameterList getDefaultParameters(String modeName)
Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList. For the gzip tile codec, no parameters are used. So null will be returned for any valid modeName specified.

Parameters:
modeName - The registry mode to return a valid parameter list for.
Throws:
IllegalArgumentException - if modeName is null.
IllegalArgumentException - if modeName is not one of the modes valid for this descriptor, i.e those returned from the getSupportedNames() method.

getDefaultParameters

public TileCodecParameterList getDefaultParameters(String modeName,
                                                   SampleModel sm)
Returns the default parameters for the specified modeName as an instance of the TileCodecParameterList, adding a "sampleModel" parameter with the specified value to the parameter list. For the gzip tile codec, no parameters are used. So null will be returned for any valid modeName specified.

This method should be used when includesSampleModelInfo() returns false. If includesSampleModelInfo() returns true, the supplied SampleModel is ignored.

If a parameter named "sampleModel" exists in the default parameter list, the supplied SampleModel will override the value associated with this default parameter.

Parameters:
modeName - The registry mode to return a valid parameter list for.
sm - The SampleModel used to create the default decoding parameter list.
Throws:
IllegalArgumentException - if modeName is null.
IllegalArgumentException - if modeName is not one of the modes valid for this descriptor, i.e those returned from the getSupportedNames() method.

getParameterListDescriptor

public ParameterListDescriptor getParameterListDescriptor(String modeName)
Returns the ParameterListDescriptor that describes the associated parameters (NOT sources). This method returns null if there are no parameters for the specified modeName. If the specified modeName supports parameters but the implementing class does not have parameters, then this method returns a non-null ParameterListDescriptor whose getNumParameters() returns 0.

Parameters:
modeName - The mode to get the ParameterListDescriptor for.
Throws:
IllegalArgumentException - if modeName is null.
IllegalArgumentException - if modeName is null.
IllegalArgumentException - if modeName is not one of the modes valid for this descriptor, i.e those returned from the getSupportedNames() method.