ccs.cpc.impl
Class SunJpegCodec

java.lang.Object
  extended by ccs.cpc.impl.SunJpegCodec
All Implemented Interfaces:
CpcImageDecoder

public class SunJpegCodec
extends java.lang.Object
implements CpcImageDecoder


Constructor Summary
SunJpegCodec()
           
 
Method Summary
 CpcImage decode(java.lang.String mimeType, byte[] wad)
          Decode the supplied image data synchronously, returning an image which is ready to use.
 java.lang.String getDescription()
          Return a user-friendly one-line description of this decoder.
 java.lang.String[] getSupportedTypes()
          Return the list of MIME types which this decoder can handle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunJpegCodec

public SunJpegCodec()
Method Detail

getSupportedTypes

public java.lang.String[] getSupportedTypes()
Return the list of MIME types which this decoder can handle.

Specified by:
getSupportedTypes in interface CpcImageDecoder

getDescription

public java.lang.String getDescription()
Return a user-friendly one-line description of this decoder. This can be in the form of a Checkpoint I18N key; the result will be fed to ccs.utils.MsgHelper before being displayed.

Specified by:
getDescription in interface CpcImageDecoder

decode

public CpcImage decode(java.lang.String mimeType,
                       byte[] wad)
Decode the supplied image data synchronously, returning an image which is ready to use. If acceptsStream returns true, this will not be called.

Specified by:
decode in interface CpcImageDecoder
Parameters:
mimeType - The apparent MIME type of the image data. You may be able to tell different (eg. by reading magic from the start of the data).
wad - The input data.
Returns:
The decoded image, if decodable. If you can't decode the image (wrong format, corrupt data, unsupported subformat / options etc.) return null.