Class FileBrowserTools

java.lang.Object
sk.iway.iwcm.common.FileBrowserTools

public class FileBrowserTools extends Object
  • Constructor Details

    • FileBrowserTools

      protected FileBrowserTools()
  • Method Details

    • hasForbiddenSymbol

      public static boolean hasForbiddenSymbol(String name)
      Checks whether a file name or path contains a forbidden character or substring.
      Parameters:
      name - file name or path to check; may be null
      Returns:
      true when a forbidden character or substring is found
    • getForbiddenSymbol

      public static String getForbiddenSymbol(String name)
      Finds a forbidden character or substring using the same exceptions as filename validation.
      Parameters:
      name - file name or path to check; may be null
      Returns:
      the first matching token in the forbidden list, or null when none is found
    • cleanMetadata

      public static IwcmFile cleanMetadata(InputStream is, int length, String filename, boolean closeIs)