RTEditor/src/main/java/com/onegravity/rteditor/utils/io/LineIterator.java
public boolean hasNext() {
        if (cachedLine != null) {
            return true;
        } else if (finished) {
            return false;
        } else {
            try {
                while (true) {
                    String line = bufferedReader.readLine();
                    if (line == null) {
                        finished = true;
                        return false;
                    } else if (isValidLine(line)) {
                        cachedLine = line;
                        return true;
                    }
                }
            } catch(IOException ioe) {
                close();
                throw new IllegalStateException(ioe);
            }
        }
    }
public boolean hasNext() {
        if (cachedLine != null) {
            return true;
        } else if (finished) {
            return false;
        } else {
            try {
                while (true) {
                    String line = bufferedReader.readLine();
                    if (line == null) {
                        finished = true;
                        return false;
                    } else if (isValidLine(line)) {
                        cachedLine = line;
                        return true;
                    }
                }
            } catch(IOException ioe) {
                close();
                throw new IllegalStateException(ioe);
            }
        }
    }
public boolean hasNext ( ) { if ( cachedLine != null ) { return true ; } else if ( finished ) { return false ; } else { try { while ( true ) { String line = bufferedReader . readLine ( ) ; if ( line == null ) { finished = true ; return false ; } else if ( isValidLine ( line ) ) { cachedLine = line ; return true ; } } } catch ( IOException ioe ) { close ( ) ; throw new IllegalStateException ( ioe ) ; } } }
Indicates whether the <code>Reader</code> has more lines.
If there is an <code>IOException</code> then {@link #close()} will
be called on this instance.

@return {@code true} if the Reader has more lines
@throws IllegalStateException if an IO exception occurs
Indicates whether the <code > Reader< / code > has more lines . If there is an <code > IOException< / code > then { @link #close () } will be called on this instance .