FileDocCategorySizeDatePackage
WBMPImageReaderSpi.javaAPI DocJava SE 5 API2513Fri Aug 26 14:54:42 BST 2005com.sun.imageio.plugins.wbmp

WBMPImageReaderSpi

public class WBMPImageReaderSpi extends ImageReaderSpi

Fields Summary
private static String[]
writerSpiNames
private static String[]
formatNames
private static String[]
entensions
private static String[]
mimeType
private boolean
registered
Constructors Summary
public WBMPImageReaderSpi()


      
        super("Sun Microsystems, Inc.",
              "1.0",
              formatNames,
              entensions,
              mimeType,
              "com.sun.imageio.plugins.wbmp.WBMPImageReader",
              STANDARD_INPUT_TYPE,
              writerSpiNames,
              true,
              null, null, null, null,
              true,
              WBMPMetadata.nativeMetadataFormatName,
              "com.sun.imageio.plugins.wbmp.WBMPMetadataFormat",
              null, null);
    
Methods Summary
public booleancanDecodeInput(java.lang.Object source)

        if (!(source instanceof ImageInputStream)) {
            return false;
        }

        ImageInputStream stream = (ImageInputStream)source;
        byte[] b = new byte[3];

        stream.mark();
        stream.readFully(b);
        stream.reset();

        return ((b[0] == (byte)0) &&  // TypeField == 0
                b[1] == 0 && // FixHeaderField == 0xxx00000; not support ext header
                ((b[2] & 0x8f) != 0 || (b[2] & 0x7f) != 0));  // First width byte
                //XXX: b[2] & 0x8f) != 0 for the bug in Sony Ericsson encoder.
    
public javax.imageio.ImageReadercreateReaderInstance(java.lang.Object extension)

        return new WBMPImageReader(this);
    
public java.lang.StringgetDescription(java.util.Locale locale)

        return "Standard WBMP Image Reader";
    
public voidonRegistration(javax.imageio.spi.ServiceRegistry registry, java.lang.Class category)

        if (registered) {
            return;
        }
        registered = true;