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

PNGImageDataEnumeration

public class PNGImageDataEnumeration extends Object implements Enumeration

Fields Summary
boolean
firstTime
ImageInputStream
stream
int
length
Constructors Summary
public PNGImageDataEnumeration(ImageInputStream stream)

    
       
          
        this.stream = stream;
        this.length = stream.readInt();
        int type = stream.readInt(); // skip chunk type
    
Methods Summary
public booleanhasMoreElements()

        if (firstTime) {
            return true;
        }

        try {
            int crc = stream.readInt();
            this.length = stream.readInt();
            int type = stream.readInt();
            if (type == PNGImageReader.IDAT_TYPE) {
                return true;
            } else {
                return false;
            }
        } catch (IOException e) {
            return false;
        }
    
public java.lang.ObjectnextElement()

        try {
            firstTime = false;
            ImageInputStream iis = new SubImageInputStream(stream, length);
            return new InputStreamAdapter(iis);
        } catch (IOException e) {
            return null;
        }