Class FileHelper


  • public class FileHelper
    extends Object
    The type File handler.
    • Constructor Detail

      • FileHelper

        public FileHelper()
    • Method Detail

      • load

        public static byte[] load​(String file)
                           throws IOException
        Load byte [ ].
        Parameters:
        file - the file
        Returns:
        the byte [ ]
        Throws:
        IOException - the io exception
      • find

        public static File find​(File parent,
                                String name)
                         throws IOException
        Find file in the parent directory provided.
        Parameters:
        parent - the parent
        name - the name
        Returns:
        the file
        Throws:
        IOException - the io exception
      • save

        public static void save​(String path,
                                String contents)
                         throws IOException
        Save a file with String content in the path provided
        Parameters:
        path - the path
        contents - the contents
        Throws:
        IOException - the io exception
      • load

        public static byte[] load​(InputStream in)
                           throws IOException
        Load InputStream to byte [ ].
        Parameters:
        in - the in
        Returns:
        the byte [ ]
        Throws:
        IOException - the io exception