java.lang.Object
org.mule.maven.pom.parser.internal.util.FileUtils

public class FileUtils extends Object
  • Constructor Details

    • FileUtils

      public FileUtils()
  • Method Details

    • getPomUrlFromJar

      public static URL getPomUrlFromJar(File artifactFile)
      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

      public static Optional<byte[]> loadFileContentFrom(URL jarFile) throws IOException
      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

      public static File newFile(String pathName)
      Workaround for JDK bug 4117557. More in-context information at MULE-1112

      Factory methods correspond to constructors of the java.io.File class. No physical file created in this method.

      See Also: