Class FileOutput
java.lang.Object
org.jacoco.agent.rt.internal.output.FileOutput
- All Implemented Interfaces:
IAgentOutput
Local only agent output that will write coverage data to the filesystem. This
controller uses the following agent options:
- destfile
- append
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate RuntimeDataprivate Fileprivate static final intprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate OutputStreamopenFile()voidshutdown()Shutdown the agent controller and clean up any resources it has created.final voidstartup(AgentOptions options, RuntimeData data) Configure the agent controller with the supplied options and connect it to the coverage runtimevoidwriteExecutionData(boolean reset) Write all execution data in the runtime to a location determined by the agent controller.
-
Field Details
-
LOCK_RETRY_COUNT
private static final int LOCK_RETRY_COUNT- See Also:
-
LOCK_RETRY_WAIT_TIME_MS
private static final long LOCK_RETRY_WAIT_TIME_MS- See Also:
-
data
-
destFile
-
append
private boolean append
-
-
Constructor Details
-
FileOutput
public FileOutput()
-
-
Method Details
-
startup
Description copied from interface:IAgentOutputConfigure the agent controller with the supplied options and connect it to the coverage runtime- Specified by:
startupin interfaceIAgentOutput- Parameters:
options- Options used to configure the agent controllerdata- Execution data for this agent- Throws:
IOException
-
writeExecutionData
Description copied from interface:IAgentOutputWrite all execution data in the runtime to a location determined by the agent controller. This method should only be called by the Agent- Specified by:
writeExecutionDatain interfaceIAgentOutput- Parameters:
reset- iftrueexecution data is cleared afterwards- Throws:
IOException- in case writing fails
-
shutdown
Description copied from interface:IAgentOutputShutdown the agent controller and clean up any resources it has created.- Specified by:
shutdownin interfaceIAgentOutput- Throws:
IOException
-
openFile
- Throws:
IOException
-