Class FileUtil


  • public class FileUtil
    extends Object
    The Class FileUtil.
    Author:
    Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Dec 2, 2021
    • Constructor Detail

      • FileUtil

        public FileUtil()
    • Method Detail

      • inputStreamToTempFile

        public static File inputStreamToTempFile​(InputStream inputStream,
                                                 String fileName)
                                          throws IOException
        Input stream to temp file.
        Parameters:
        inputStream - the input stream
        fileName - the file name
        Returns:
        the file
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • inputStreamToTempFile

        public static File inputStreamToTempFile​(String copyString,
                                                 String prefixFile)
                                          throws IOException
        Input stream to temp file.
        Parameters:
        copyString - the copy string
        Returns:
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • copyInputStreamToFile

        public static File copyInputStreamToFile​(InputStream is,
                                                 String to)
                                          throws IOException
        Copy input stream to file.
        Parameters:
        is - the is
        to - the to
        Returns:
        the file
        Throws:
        IOException - Signals that an I/O exception has occurred.