Class AbstractEoulsanRuntime

    • Constructor Detail

      • AbstractEoulsanRuntime

        protected AbstractEoulsanRuntime​(Settings settings)
    • Method Detail

      • getSettings

        public Settings getSettings()
        Get Settings.
        Returns:
        a Settings object
      • getTempDirectory

        public abstract File getTempDirectory()
        Get the temporary directory.
        Returns:
        the temporary directory as a File object
      • getInputStream

        public abstract InputStream getInputStream​(String dataSource)
                                            throws IOException
        Create an InputStream to load data.
        Parameters:
        dataSource - the source of the data to load
        Returns:
        an InputStream corresponding to the source
        Throws:
        IOException - if an error occurs the InputStream
      • getRawInputStream

        public abstract InputStream getRawInputStream​(String dataSource)
                                               throws IOException
        Create a raw InputStream (without decompression of input data) to load data.
        Parameters:
        dataSource - the source of the data to load
        Returns:
        an InputStream corresponding to the source
        Throws:
        IOException - if an error occurs the InputStream
      • getOutputStream

        public abstract OutputStream getOutputStream​(String dataSource)
                                              throws IOException
        Create an OutputStream to load data.
        Parameters:
        dataSource - the source of the data to load
        Returns:
        an OutputStream corresponding to the source
        Throws:
        IOException - if an error occurs the OutputStream
      • decompressInputStreamIsNeeded

        protected InputStream decompressInputStreamIsNeeded​(InputStream is,
                                                            String source)
                                                     throws IOException
        Decompress an inputStream if needed.
        Parameters:
        is - the InputStream
        source - source of the inputStream
        Returns:
        a InputStream with decompression integrated or not
        Throws:
        IOException - if an error occurs while creating decompressor InputStream
      • createTempDir

        public File createTempDir()
                           throws IOException
        Create a new temporary directory.
        Returns:
        the new directory
        Throws:
        IOException - if there is an error creating the temporary directory
      • createTempDir

        public File createTempDir​(String prefix)
                           throws IOException
        Create a new temporary directory.
        Parameters:
        prefix - prefix of the temporary directory
        Returns:
        the new directory
        Throws:
        IOException - if there is an error creating the temporary directory
      • createTempFile

        public File createTempFile​(String prefix,
                                   String suffix)
                            throws IOException
        Create a new temporary file.
        Parameters:
        prefix - Prefix of the temporary file
        suffix - suffix of the temporary file
        Returns:
        the new temporary file
        Throws:
        IOException - if there is an error creating the temporary directory
      • createFileInTempDir

        public File createFileInTempDir​(String filename)
        Create a file in the temporary directory.
        Parameters:
        filename - The filename to create
        Returns:
        The new File