Package hudson.maven.reporters
Class MavenArtifact.TemporaryFile
java.lang.Object
hudson.maven.reporters.MavenArtifact.TemporaryFile
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Enclosing class:
- MavenArtifact
Representation of an archived artifact that might be accessed in various ways.
Release in a
finally
-block.- Since:
- 2.0.3
-
Method Details
-
getVirtualFile
Gets the artifact from whatever storage mechanism is appropriate. This is the preferred method for code that does not need to deal withFile
specifically.- Returns:
- the purported location of the artifact (might no longer exist if it has since been deleted)
-
getFile
Gets the artifact as a local file, perhaps creating a temporary copy as needed. You mustclose()
it when finished; do not delete the result file yourself.- Returns:
- either the original artifact, or a copy thereof; may not exist if it has since been deleted
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-