Class FileUtil


  • public class FileUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      FileUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDotExtension​(java.io.File receiver)  
      static java.lang.String getFileContent​(java.io.File receiver)  
      static byte[] getFileContentBytes​(java.io.File receiver)  
      static byte[] getFileContentBytesWithExceptions​(java.io.File receiver)  
      static java.lang.String getFileContentWithExceptions​(java.io.File receiver)  
      static java.lang.String getNameOnly​(java.io.File receiver)  
      static boolean isChildOf​(java.io.File receiver, java.io.File ancestor)  
      static java.lang.String pathSlash​(java.io.File receiver)  
      static java.io.File plus​(java.io.File receiver, java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileUtil

        public FileUtil()
    • Method Detail

      • isChildOf

        public static boolean isChildOf​(java.io.File receiver,
                                        java.io.File ancestor)
      • getNameOnly

        public static java.lang.String getNameOnly​(java.io.File receiver)
      • getDotExtension

        public static java.lang.String getDotExtension​(java.io.File receiver)
      • pathSlash

        public static java.lang.String pathSlash​(java.io.File receiver)
      • plus

        public static java.io.File plus​(java.io.File receiver,
                                        java.lang.String name)
      • getFileContent

        @Nullable
        public static java.lang.String getFileContent​(java.io.File receiver)
      • getFileContentWithExceptions

        @NotNull
        public static java.lang.String getFileContentWithExceptions​(java.io.File receiver)
                                                             throws java.io.IOException
        Throws:
        java.io.IOException
      • getFileContentBytes

        @Nullable
        public static byte[] getFileContentBytes​(java.io.File receiver)
      • getFileContentBytesWithExceptions

        @NotNull
        public static byte[] getFileContentBytesWithExceptions​(java.io.File receiver)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException