Package org.jacoco.core.tools
Class ExecFileLoader
java.lang.Object
org.jacoco.core.tools.ExecFileLoader
Convenience utility for loading *.exec files into a
ExecutionDataStore
and a SessionInfoStore
.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNew instance to combine session infos and execution data from multiple files. -
Method Summary
Modifier and TypeMethodDescriptionReturns the execution data store with data for all loaded classes.Returns the session info store with all loaded sessions.void
Reads all data from given input stream.void
load
(InputStream stream) Reads all data from given input stream.void
Saves the current content into the given file.void
save
(OutputStream stream) Saves the current content into the given output stream.
-
Field Details
-
sessionInfos
-
executionData
-
-
Constructor Details
-
ExecFileLoader
public ExecFileLoader()New instance to combine session infos and execution data from multiple files.
-
-
Method Details
-
load
Reads all data from given input stream.- Parameters:
stream
- Stream to read data from- Throws:
IOException
- in case of problems while reading from the stream
-
load
Reads all data from given input stream.- Parameters:
file
- file to read data from- Throws:
IOException
- in case of problems while reading from the stream
-
save
Saves the current content into the given output stream.- Parameters:
stream
- stream to save content to- Throws:
IOException
- in case of problems while writing to the stream
-
save
Saves the current content into the given file. Parent directories are created as needed. Also a files system lock is acquired to avoid concurrent write access.- Parameters:
file
- file to save content toappend
-true
if the content should be appended, otherwise the file is overwritten.- Throws:
IOException
- in case of problems while writing to the stream
-
getSessionInfoStore
Returns the session info store with all loaded sessions.- Returns:
- session info store
-
getExecutionDataStore
Returns the execution data store with data for all loaded classes.- Returns:
- execution data store
-