## javax.media.jai.tilecodec
Class TileDecoderImpl

    java.lang.Object
      |
      +--javax.media.jai.tilecodec.TileDecoderImpl

All Implemented Interfaces:
  TileDecoder

public abstract class TileDecoderImpl
extends java.lang.Object
implements TileDecoder

A partial implementation of the `TileDecoder` interface useful for subclassing.

Since:
  1.1

Field Summary
`protected java.lang.String` `formatName` The name of the format.
`protected java.io.InputStream` `inputStream` The `InputStream` containing the encoded data to decode.
`protected TileCodecParameterList` `paramList` The `TileCodecParameterList` object containing the decoding parameters.

Constructor Summary
`TileDecoderImpl(java.lang.String formatName, java.io.InputStream input, TileCodecParameterList param)` Constructs a `TileDecoderImpl`.

Method Summary
`TileCodecParameterList` `getDecodeParameterList()` Returns the current parameters as an instance of the `TileCodecParameterList` interface.
`java.lang.String` `getFormatName()` Returns the format name.
`java.io.InputStream` `getInputStream()` Returns the `InputStream` associated with this `TileDecoder`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface javax.media.jai.tilecodec.TileDecoder
`decode, decode`

Field Detail

### formatName

    protected java.lang.String formatName

  The name of the format.

### inputStream

    protected java.io.InputStream inputStream

  The `InputStream` containing the encoded data to decode.

### paramList

    protected TileCodecParameterList paramList

  The `TileCodecParameterList` object containing the decoding parameters.

Constructor Detail

### TileDecoderImpl

    public TileDecoderImpl(java.lang.String formatName,
                           java.io.InputStream input,
                           TileCodecParameterList param)

  Constructs a `TileDecoderImpl`. An `IllegalArgumentException` will be thrown if `param`'s `getParameterListDescriptor()` method does not return the same descriptor as that from the associated `TileCodecDescriptor`'s `getParameterListDescriptor` method for the "tileDecoder" registry mode.

  If param is null, then the default parameter list for decoding as defined by the associated `TileCodecDescriptor`'s `getDefaultParameters()` method will be used for decoding. If this too is null, an `IllegalArgumentException` will be thrown if the `ParameterListDescriptor` associated with the associated `TileCodecDescriptor` for the "tileDecoder" registry mode, reports that the number of parameters for this format is non-zero.

  Parameters:
    `formatName` - The name of the format.
    `input` - The `InputStream` to decode data from.
    `param` - The object containing the tile decoding parameters.
  Throws:
    `java.lang.IllegalArgumentException` - if formatName is null.
    `java.lang.IllegalArgumentException` - if input is null.
    `java.lang.IllegalArgumentException` - if param's getFormatName() method does not return the same formatName as the one specified to this method.
    `java.lang.IllegalArgumentException` - if the ParameterListDescriptor associated with the param and the associated TileCodecDescriptor are not equal.
    `java.lang.IllegalArgumentException` - if param does not have "tileDecoder" as one of the valid modes that it supports.
    `java.lang.IllegalArgumentException` - if the associated TileCodecDescriptor's includesSampleModelInfo() returns false and a non-null value for the "sampleModel" parameter is not supplied in the supplied parameter list.

Method Detail

### getFormatName

    public java.lang.String getFormatName()

  Returns the format name.
  Specified by:
    `getFormatName` in interface `TileDecoder`

### getDecodeParameterList

    public TileCodecParameterList getDecodeParameterList()

  Returns the current parameters as an instance of the `TileCodecParameterList` interface.
  Specified by:
    `getDecodeParameterList` in interface `TileDecoder`

### getInputStream

    public java.io.InputStream getInputStream()

  Returns the `InputStream` associated with this `TileDecoder`.
  Specified by:
    `getInputStream` in interface `TileDecoder`