Class FileIO


  • @Singleton
    public class FileIO
    extends Object
    This class manages reading from and writing to files.
    • Constructor Detail

      • FileIO

        @Inject
        public FileIO()
    • Method Detail

      • writeContentToFile

        public void writeContentToFile​(byte[] content,
                                       String filePath)
                                throws FileCreationException
        Write byte array content to a file.
        Parameters:
        content - the byte array content to be written.
        filePath - the complete path to the target file.
        Throws:
        FileCreationException - a FileCreationException in case the file cannot be created.
      • isExistingFile

        public boolean isExistingFile​(String filePath)
        Check if a file exists.
        Parameters:
        filePath - the complete path to the file.
        Returns:
        true if the file exists.