Class UploadUtil


  • public final class UploadUtil
    extends java.lang.Object
    This class provides utilities for uploaded files
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String cleanFileName​(java.lang.String strName)
      Removes special characters contained in the file name
      static java.lang.String cleanFilePath​(java.lang.String strPath)
      Removes special characters contained in a file path.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • cleanFileName

        public static java.lang.String cleanFileName​(java.lang.String strName)
        Removes special characters contained in the file name
        Parameters:
        strName - the file name
        Returns:
        strClearName the cleaned file name
      • cleanFilePath

        public static java.lang.String cleanFilePath​(java.lang.String strPath)
        Removes special characters contained in a file path. This method performs the same transformation as cleanFileName but leaves out the slashes.
        Parameters:
        strPath - The path to clean
        Returns:
        The cleaned path