Class FileUtils
java.lang.Object
org.mule.maven.pom.parser.internal.util.FileUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic URLgetPomUrlFromJar(File artifactFile) Finds the URL of the pom file within the artifact file.static Optional<byte[]>loadFileContentFrom(URL jarFile) Loads the content of a file within a jar into a byte array.static FileWorkaround for JDK bug 4117557.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
getPomUrlFromJar
Finds the URL of the pom file within the artifact file.- Parameters:
artifactFile- the artifact file to search for the pom file.- Returns:
- the URL to the pom file.
-
loadFileContentFrom
Loads the content of a file within a jar into a byte array.- Parameters:
jarFile- the jar file- Returns:
- the content of the file as byte array or empty if the file does not exists within the jar file.
- Throws:
IOException- if there was a problem reading from the jar file.
-
newFile
Workaround for JDK bug 4117557. More in-context information at MULE-1112 Factory methods correspond to constructors of thejava.io.File class. No physical file created in this method.- See Also:
-