All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.clover.reporters.html.source.PlaintextLineTraverser Maven / Gradle / Ivy

Go to download

Clover is an award winning code coverage and testing tool for Java and Groovy. It integrates easily with Maven, Ant, Grails, Eclipse and IntelliJ IDEA as well as with continuous integration servers such as Bamboo, Jenkins or Hudson. Note: before Clover 4.0 this artifact was named com.cenqua.clover:clover.

The newest version!
package com.atlassian.clover.reporters.html.source;

import com.atlassian.clover.registry.entities.FullFileInfo;

import java.io.Reader;
import java.io.BufferedReader;
import java.io.IOException;

public class PlaintextLineTraverser implements SourceTraverser {
    @Override
    public void traverse(Reader sourceReader, FullFileInfo fileInfo, L listener) throws IOException {
        BufferedReader bufferedReader = new BufferedReader(sourceReader);
        String line = bufferedReader.readLine();

        listener.onStartDocument();
        while (line != null) {
            listener.onChunk(line);
            line = bufferedReader.readLine();
            if (line != null) {
                listener.onNewLine();
            }
        }
        listener.onEndDocument();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy