Package org.jacoco.core.data

Examples of org.jacoco.core.data.ExecutionDataReader


  }

  private void loadExecutionData() throws IOException {
    final FileInputStream fis = new FileInputStream(executionDataFile);
    final ExecutionDataReader executionDataReader = new ExecutionDataReader(
        fis);
    executionDataStore = new ExecutionDataStore();
    sessionInfoStore = new SessionInfoStore();

    executionDataReader.setExecutionDataVisitor(executionDataStore);
    executionDataReader.setSessionInfoVisitor(sessionInfoStore);

    while (executionDataReader.read()) {
    }

    fis.close();
  }
View Full Code Here


    for (final Iterator<?> i = executiondataElement.iterator(); i.hasNext();) {
      final Resource resource = (Resource) i.next();
      InputStream in = null;
      try {
        in = new BufferedInputStream(resource.getInputStream());
        final ExecutionDataReader reader = new ExecutionDataReader(in);
        reader.setExecutionDataVisitor(data);
        reader.read();
      } catch (final IOException e) {
        throw new BuildException("Unable to read execution data file "
            + resource.getName(), e);
      } finally {
        FileUtils.close(in);
View Full Code Here


   private void read(InputStream stream, IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionVisitor)
         throws IOException
   {
      ExecutionDataReader reader = new ExecutionDataReader(stream);

      reader.setExecutionDataVisitor(executionDataVisitor);
      reader.setSessionInfoVisitor(sessionVisitor);
      try
      {
         reader.read();
      }
      catch (IOException e)
      {
         throw new RuntimeException("Could not read data to ExecutionDataStore from InputStream", e);
      }
View Full Code Here


   private void read(InputStream stream, IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionVisitor)
         throws IOException
   {
      ExecutionDataReader reader = new ExecutionDataReader(stream);

      reader.setExecutionDataVisitor(executionDataVisitor);
      reader.setSessionInfoVisitor(sessionVisitor);
      try
      {
         reader.read();
      }
      catch (IOException e)
      {
         throw new RuntimeException("Could not read data to ExecutionDataStore from InputStream", e);
      }
View Full Code Here

    sessionInfoStore = new SessionInfoStore();
    executionDataStore = new ExecutionDataStore();
    FileInputStream in = null;
    try {
      in = new FileInputStream(dataFile);
      final ExecutionDataReader reader = new ExecutionDataReader(in);
      reader.setSessionInfoVisitor(sessionInfoStore);
      reader.setExecutionDataVisitor(executionDataStore);
      reader.read();
    } finally {
      if (in != null) {
        in.close();
      }
    }
View Full Code Here

    for (final Iterator<?> i = executiondataElement.iterator(); i.hasNext();) {
      final Resource resource = (Resource) i.next();
      InputStream in = null;
      try {
        in = new BufferedInputStream(resource.getInputStream());
        final ExecutionDataReader reader = new ExecutionDataReader(in);
        reader.setExecutionDataVisitor(data);
        reader.read();
      } catch (final IOException e) {
        throw new BuildException("Unable to read execution data file "
            + resource.getName(), e);
      } finally {
        FileUtils.close(in);
View Full Code Here

    for (final Iterator<?> i = executiondataElement.iterator(); i.hasNext();) {
      final Resource resource = (Resource) i.next();
      InputStream in = null;
      try {
        in = new BufferedInputStream(resource.getInputStream());
        final ExecutionDataReader reader = new ExecutionDataReader(in);
        reader.setExecutionDataVisitor(data);
        reader.read();
      } catch (final IOException e) {
        throw new BuildException("Unable to read execution data file "
            + resource.getName(), e);
      } finally {
        FileUtils.close(in);
View Full Code Here

          Project.MSG_DEBUG);

      InputStream resourceStream = null;
      try {
        resourceStream = resource.getInputStream();
        final ExecutionDataReader reader = new ExecutionDataReader(
            resourceStream);
        reader.setExecutionDataVisitor(dataStore);
        reader.read();

        numFilesMerged++;
      } catch (final IOException e) {
        throw new BuildException(String.format("Unable to read %s",
            resource.getName()), e);
View Full Code Here

          Project.MSG_DEBUG);

      InputStream resourceStream = null;
      try {
        resourceStream = resource.getInputStream();
        final ExecutionDataReader reader = new ExecutionDataReader(
            resourceStream);
        reader.setSessionInfoVisitor(infoStore);
        reader.setExecutionDataVisitor(dataStore);
        reader.read();

        numFilesMerged++;
      } catch (final IOException e) {
        throw new BuildException(String.format("Unable to read %s",
            resource.getName()), e);
View Full Code Here

      if (input instanceof CoverageSessionInput) {
        final CoverageSessionInput csi = (CoverageSessionInput) input;
        csi.getSession().accept(executionData, sessionData);
      } else {
        final InputStream stream = openStream(input);
        final ExecutionDataReader reader = new ExecutionDataReader(stream);
        reader.setExecutionDataVisitor(executionData);
        reader.setSessionInfoVisitor(sessionData);
        while (reader.read()) {
          // Do nothing
        }
      }
    } catch (CoreException e) {
      EclEmmaUIPlugin.log(e);
View Full Code Here

TOP

Related Classes of org.jacoco.core.data.ExecutionDataReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.