Class BaseSourceHelper

java.lang.Object
io.github.mmm.code.base.source.BaseSourceHelper

public class BaseSourceHelper extends Object
Simple helper class for implementations related to BaseSource.
Since:
1.0.0
Author:
Joerg Hohwiller (hohwille at users.sourceforge.net)
  • Constructor Details

    • BaseSourceHelper

      public BaseSourceHelper()
  • Method Details

    • getFileOrNull

      public static File getFileOrNull(File file)
      Parameters:
      file - the File to check. May be null.
      Returns:
      the given File if it is an existing regular file, null otherwise.
    • asUrl

      public static URL asUrl(File file)
      Parameters:
      file - the File to convert. May be null
      Returns:
      the URL pointing to the given File or null if the given File was null.
    • asFile

      public static File asFile(URL url)
      Parameters:
      url - the URL to convert. May be null
      Returns:
      the File pointing to the given URL or null if the given URL was null.