Code example for RasterFormatException

0
    public boolean nextLineDone() { 
        boolean check = src.nextLineDone(); 
        if (check == dst.nextLineDone()) { 
            return check; 
        } 
        throw new RasterFormatException(ERROR); 
    } 
 
    /** 
     * Sets the iterator to the next pixel in the image (that is, move rightward). 
     */ 
    public boolean nextPixelDone() { 
        boolean check = src.nextPixelDone(); 
        if (check == dst.nextPixelDone()) { 
            return check; 
        } 
        throw new RasterFormatException(ERROR); 
    } 
 
    /**