FileDocCategorySizeDatePackage
PNGImageReaderSpi.javaAPI DocJava SE 6 API2499Tue Jun 10 00:21:52 BST 2008com.sun.imageio.plugins.png

PNGImageReaderSpi

public class PNGImageReaderSpi extends ImageReaderSpi
version
0.5

Fields Summary
private static final String
vendorName
private static final String
version
private static final String[]
names
private static final String[]
suffixes
private static final String[]
MIMETypes
private static final String
readerClassName
private static final String[]
writerSpiNames
Constructors Summary
public PNGImageReaderSpi()


      
        super(vendorName,
              version,
              names,
              suffixes,
              MIMETypes,
              readerClassName,
              STANDARD_INPUT_TYPE,
              writerSpiNames,
              false,
              null, null,
              null, null,
              true,
              PNGMetadata.nativeMetadataFormatName,
              "com.sun.imageio.plugins.png.PNGMetadataFormat",
              null, null
              );
    
Methods Summary
public booleancanDecodeInput(java.lang.Object input)

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

        ImageInputStream stream = (ImageInputStream)input;
        byte[] b = new byte[8];
        stream.mark();
        stream.readFully(b);
        stream.reset();
        
        return (b[0] == (byte)137 &&
                b[1] == (byte)80 &&
                b[2] == (byte)78 &&
                b[3] == (byte)71 &&
                b[4] == (byte)13 &&
                b[5] == (byte)10 &&
                b[6] == (byte)26 &&
                b[7] == (byte)10);
    
public javax.imageio.ImageReadercreateReaderInstance(java.lang.Object extension)

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

        return "Standard PNG image reader";