FileDocCategorySizeDatePackage
PNGImageReader.javaAPI DocJava SE 5 API57820Fri Aug 26 14:54:42 BST 2005com.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;
        }