Class IOHelper

java.lang.Object
net.simplace.core.service.IOHelper

public final class IOHelper extends Object
provides different helper methods for IO
Author:
Andreas Enders
  • Field Details

    • PATH_BACK_PATTERN

      public static final Pattern PATH_BACK_PATTERN
      For the replacement of the '..' in paths
  • Method Details

    • getFileExtension

      public static final String getFileExtension(String aFullFileName)
      Parameters:
      aFullFileName -
      Returns:
      the extension of a given full File name.
    • getFilename

      public static final String getFilename(String aFullFileName)
      Parameters:
      aFullFileName -
      Returns:
      the name part of a given full file name (without directory pathes).
    • getFilenameWithExtension

      public static String getFilenameWithExtension(String aFullFileName)
      Parameters:
      aFullFileName -
      Returns:
      the name with extension of a given full file name (without directory pathes).
    • getAllFileNamesInDirectory

      public static final Set<String> getAllFileNamesInDirectory(String aDirectory, String aExtension)
      Parameters:
      aDirectory -
      aExtension -
      Returns:
      all the file names with the given extension in a directory.
    • writeObjectToFile

      public static void writeObjectToFile(File aDestFile, Object aObject) throws FileNotFoundException, IOException
      Returns the name part of a given full file name (without directory pathes).
      Parameters:
      aDestFile -
      aObject -
      Throws:
      FileNotFoundException
      IOException
    • readObjectFromFile

      public static final Object readObjectFromFile(File aSourceFile) throws FileNotFoundException, IOException, Exception
      Parameters:
      aSourceFile -
      Returns:
      the name part of a given full file name (without directory pathes).
      Throws:
      FileNotFoundException
      IOException
      Exception
    • copyFiles

      public static final void copyFiles(File aSourceDir, File aDesDir) throws IOException
      Copies the content of the given directory to the given targetdirectory.
      Parameters:
      aSourceDir -
      aDesDir -
      Throws:
      IOException
    • copyFiles

      public static final void copyFiles(File aSourceDir, File aDesDir, FileFilter aFileFilter, boolean aShouldOverwrite) throws IOException
      Copies the content of the given directory to the given targetdirectory. Copies only files that match the given FileFilter.
      Parameters:
      aSourceDir -
      aDesDir -
      aFileFilter -
      aShouldOverwrite -
      Throws:
      IOException
    • copyDirectory

      public static void copyDirectory(File aSourceDirectory, File aDestinationDirectory, boolean aCopySubFolders, boolean aOverwriteCopy) throws IOException
      copies all contents of one folder to another one. use the last parameter to define, if you want to copy all subfolders including content
      Parameters:
      aSourceDirectory -
      aDestinationDirectory -
      aCopySubFolders -
      aOverwriteCopy -
      Throws:
      IOException
    • copyFile

      public static final void copyFile(File aSourceFile, File aDestFile, boolean aShouldOverwrite) throws FileNotFoundException, IOException
      Copy a file and create the directory structure for the destination file if it doesnt already exist. Overwrite the destination file if it already exists.
      Parameters:
      aSourceFile -
      aDestFile -
      aShouldOverwrite -
      Throws:
      FileNotFoundException - Thrown if the source file cannot be found.
      IOException - Thrown if an error occurs while copying.
    • moveFile

      public static final void moveFile(File aSourceFile, File aDestFile, boolean aShouldOverwrite) throws FileNotFoundException, IOException
      Copy a file and create the directory structure for the destination file if it doesnt already exist. Overwrite the destination file if it already exists.
      Parameters:
      aSourceFile -
      aDestFile -
      aShouldOverwrite -
      Throws:
      FileNotFoundException - Thrown if the source file cannot be found.
      IOException - Thrown if an error occurs while copying.
    • addLineToFile

      public static final void addLineToFile(File aFile, String aStringToAppend, int aMaxKBSizeOfFile) throws IOException
      Constructs a FileWriter object given a File object. String will be written to the end of the file.
      Parameters:
      aFile - a File object to write to, if doesn't exist it will be created.
      aStringToAppend - String that should be appended to the File
      aMaxKBSizeOfFile - max size of File
      Throws:
      IOException - if the file exists but is a directory rather than a regular file, does not exist but cannot be created, or cannot be opened for any other reason
    • readFirstCharsOfFile

      public static final String readFirstCharsOfFile(File aFile, int aNumberOfChars) throws IOException
      Reads the first chars of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      aNumberOfChars - if true, then bytes will be written to the end of the file rather than the beginning
      Returns:
      the first chars of a File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readLinesOfFile

      public static final Vector<String> readLinesOfFile(File aFile, String aEncoding, Integer[] aLinesToRead) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      aEncoding - if true, then bytes will be written to the end of the file rather than the beginning
      aLinesToRead -
      Returns:
      the last line of a File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readFile

      public static final String readFile(File aFile) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      Returns:
      the File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readFile

      public static final String readFile(File aFile, String aEncoding) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      aEncoding - if true, then bytes will be written to the end of the file rather than the beginning
      Returns:
      the File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • getInputStream

      public static InputStream getInputStream(File aFile) throws IOException
      Parameters:
      aFile -
      Returns:
      a File's InputStream - either from Zip, GZ, TarGZ, Resource or simply the file
      Throws:
      IOException
    • getOutputStream

      public static final OutputStream getOutputStream(File aFile) throws IOException
      Creates an OutputStream using the special needs of samba shares and gz.
      Parameters:
      aFile -
      Returns:
      the output stream to write to
      Throws:
      IOException
    • readLinesOfFile

      public static final Vector<String> readLinesOfFile(File aFile) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      Returns:
      the last line of a File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readFileToArray

      public static String[][] readFileToArray(File aFileData, String aDivider, Integer[] aLinesToRead, Integer aSkipHeaderLines) throws IOException
      Reads a file to an array
      Parameters:
      aFileData - a File object to read from.
      aDivider - if true, then bytes will be written to the end of the file rather than the beginning
      aLinesToRead -
      aSkipHeaderLines -
      Returns:
      Double array of file content
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readFileToArray

      public static String[][] readFileToArray(File aFileData, String aDivider, Integer[] aLinesToRead) throws IOException
      Reads a file to an array
      Parameters:
      aFileData - a File object to read from.
      aDivider - if true, then bytes will be written to the end of the file rather than the beginning
      aLinesToRead -
      Returns:
      Double array of file content
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readLinesOfStream

      public static final Vector<String> readLinesOfStream(InputStream aInputStream, Integer[] aLinesToRead, String encoding) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aInputStream - a File object to read from.
      aLinesToRead -
      encoding - if true, then bytes will be written to the end of the file rather than the beginning
      Returns:
      line vector of stream
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readStreamToArray

      public static String[][] readStreamToArray(InputStream aInputStream, String aDivider, String aEncoding) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aInputStream - a File object to read from.
      aDivider - divider character
      aEncoding - if true, then bytes will be written to the end of the file rather than the beginning
      Returns:
      a stream to an array with encoding
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • writeLinesOfFile

      public static final void writeLinesOfFile(Vector<String> aLinesVector, File aFile) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      aLinesVector - if true, then bytes will be written to the end of the file rather than the beginning
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • readLastLineOfFile

      public static final String readLastLineOfFile(File aFile) throws IOException
      Reads the last line of a File and returns it in a String.
      Parameters:
      aFile - a File object to read from.
      Returns:
      the last line of a File and returns it in a String.
      Throws:
      IOException - if the file does not exist but cannot be created, or cannot be opened for any other reason
    • stringBufferFromInputStream

      public static final StringBuffer stringBufferFromInputStream(InputStream aInputStream) throws IOException
      Read the contents of a String from an InputStream.
      Parameters:
      aInputStream -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • stringBufferFromInputStream

      public static final StringBuffer stringBufferFromInputStream(InputStream aInputStream, String aEncoding) throws IOException
      Read the contents of a String from an InputStream.
      Parameters:
      aInputStream -
      aEncoding -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • stringFromInputStream

      public static final String stringFromInputStream(InputStream aInputStream) throws IOException
      Read the contents of a String from an InputStream.
      Parameters:
      aInputStream -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • stringFromInputStream

      public static final String stringFromInputStream(InputStream aInputStream, String aEncoding) throws IOException
      Read the contents of a String from an InputStream.
      Parameters:
      aInputStream -
      aEncoding -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • encodedStringFromInputStream

      public static final String encodedStringFromInputStream(InputStream aInputStream, String aEncoding) throws IOException
      Returns the contents of a String from an InputStream in the given encoded format.
      Parameters:
      aInputStream -
      aEncoding -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • encodedStringFromInputStream

      public static final String encodedStringFromInputStream(InputStream aInputStream) throws IOException
      Returns the contents of a String from an InputStream in the UTF-8 encoded format.
      Parameters:
      aInputStream -
      Returns:
      the contents of a String from an InputStream.
      Throws:
      IOException
    • platformDefaultToUTF8

      public static final String platformDefaultToUTF8(String aString) throws IOException
      Turns a String which was created using the platform standard encoding to an String which is encoded using UTF-8 encoding.
      Parameters:
      aString -
      Returns:
      a String as UTF encoding
      Throws:
      IOException
    • isXMLFileExtension

      public static final boolean isXMLFileExtension(String aExtension)
      Parameters:
      aExtension -
      Returns:
      if the extension belongs to an UTF-8 encoded XML file.
    • UTF8ToPlatformDefault

      public static final String UTF8ToPlatformDefault(String aString) throws IOException
      Turns a String which was created using the UTF-8 encoding to an String which is encoded using platform standard encoding.
      Parameters:
      aString -
      Returns:
      a String which was created using the UTF-8 encoding
      Throws:
      IOException
    • stringToOutputStream

      public static final void stringToOutputStream(String aString, OutputStream aOutputStream) throws IOException
      Write the contents of a String to an OutputStream. The Stream won't be closed at the end.
      Parameters:
      aString -
      aOutputStream -
      Throws:
      IOException
    • stringBufferToOutputStream

      public static final void stringBufferToOutputStream(StringBuffer aStringBuffer, OutputStream aOutputStream) throws IOException
      Write the contents of a StringBuffer to an OutputStream. The Stream won't be closed at the end.
      Parameters:
      aStringBuffer -
      aOutputStream -
      Throws:
      IOException
    • stringToOutputStreamAndClose

      public static final void stringToOutputStreamAndClose(String aString, OutputStream aOutputStream) throws IOException
      Write the contents of a String to an OutputStream. The Stream will be closed at the end.
      Parameters:
      aString -
      aOutputStream -
      Throws:
      IOException
    • stringToOutputStream

      public static final void stringToOutputStream(String aString, OutputStream aOutputStream, String aEncoding) throws IOException
      Write the contents of a String to an OutputStream in the given encoding. The Stream won't be closed at the end.
      Parameters:
      aString -
      aOutputStream -
      aEncoding -
      Throws:
      IOException
    • stringToOutputStreamAndClose

      public static final void stringToOutputStreamAndClose(String aString, OutputStream aOutputStream, String aEncoding) throws IOException
      Write the contents of a String to an OutputStream in the given encoding. The Stream will be closed at the end.
      Parameters:
      aString -
      aOutputStream -
      aEncoding -
      Throws:
      IOException
    • stringToFile

      public static final void stringToFile(String aString, File aFile, String aEncoding) throws IOException
      Write the contents of a String to a File in the given encoding. The Stream will be closed at the end.
      Parameters:
      aString -
      aFile -
      aEncoding -
      Throws:
      IOException
    • stringToFile

      public static final void stringToFile(String aString, File aFile) throws IOException
      Write the contents of a String to a File in platform standard encoding. The Stream will be closed at the end.
      Parameters:
      aString -
      aFile -
      Throws:
      IOException
    • fileToOutputStream

      public static final void fileToOutputStream(File aFile, OutputStream aOutputStream) throws IOException
      Copy data from a file to an OututStream.
      Parameters:
      aFile -
      aOutputStream -
      Throws:
      IOException
    • fileFromInputStream

      public static final void fileFromInputStream(File aFile, InputStream aInputStream) throws IOException
      Copy data from an InputStream to a file.
      Parameters:
      aFile -
      aInputStream -
      Throws:
      IOException
    • copyStream

      public static final void copyStream(InputStream aInputStream, OutputStream aOutputStream) throws IOException
      Copy data from an InputStream to an OutputStream.
      Parameters:
      aInputStream -
      aOutputStream -
      Throws:
      IOException
    • copyStream

      public static final void copyStream(Reader aReader, Writer aWriter) throws IOException
      Copy data from an Reader to an Writer.
      Parameters:
      aReader -
      aWriter -
      Throws:
      IOException
    • createDir

      public static final void createDir(File aDir) throws IOException
      Create a directory including its parent directories if they dont already exist.
      Parameters:
      aDir -
      Throws:
      IOException
    • deleteFile

      public static final boolean deleteFile(File aFile)
      Delete a file if it exists.
      Parameters:
      aFile -
      Returns:
      success
    • getFiles

      public static final List<File> getFiles(File aFile, boolean aShouldIncludeSubdirs)
      Parameters:
      aFile -
      aShouldIncludeSubdirs -
      Returns:
      all the file objects within a directory(and also sub directories) excluding the directories in it (Excluding the directory file objects.).
    • getFilesForPattern

      public static final List<File> getFilesForPattern(File aFile, String aRegexpPattern, boolean aShouldIncludeSubdirs, boolean aIgnoreCase)
      Parameters:
      aFile -
      aRegexpPattern -
      aShouldIncludeSubdirs -
      aIgnoreCase -
      Returns:
      all the file objects within a directory(and also sub directories) excluding the directories in it (Excluding the directory file objects.).
    • deleteFiles

      public static final void deleteFiles(File aFile) throws IOException
      Deletes all the files in a directory including the sub directories files, if the given file is a directory. !!!The sub directories won't be deleted!!!
      Parameters:
      aFile -
      Throws:
      IOException
    • deleteFiles

      public static void deleteFiles(File aSourceDir, FileFilter aFileFilter)
      Parameters:
      aSourceDir -
      aFileFilter - Deletes all the files accepted in the fileFilter returning true if successful
    • deleteFiles

      public static final boolean deleteFiles(Collection<File> aFilesCollection)
      Deletes all the files in the given FilesCollection returning true if successful
      Parameters:
      aFilesCollection -
      Returns:
      success
    • deleteDir

      public static final boolean deleteDir(File dir)
      Deletes all the files in a directory including the sub directories files, if the given file is a directory and also the directory.
      Parameters:
      dir -
      Returns:
      success
    • deleteDir

      public static final boolean deleteDir(File dir, boolean goOnWithError)
      Deletes all the files in a directory including the sub directories files, if the given file is a directory and also the directory.
      Parameters:
      dir -
      goOnWithError -
      Returns:
      success
    • isEmpty

      public static final boolean isEmpty(File aDirectory)
      Parameters:
      aDirectory -
      Returns:
      if the given directory is an empty directory including sub directories.
    • deleteDirContents

      public static final boolean deleteDirContents(File dir, boolean goOnOnError)
      Deletes all the files in a directory including the sub directories files, if the given file is a directory but does not delete the directory itself.
      Parameters:
      dir -
      goOnOnError -
      Returns:
      success
    • deleteDirContents

      public static final boolean deleteDirContents(File aDir, String aExtension, long aOlderThanMillis)
      Deletes all the files in a directory including the sub directories files, if the given file is a directory but does not delete the directory itself. It only deletes files with given extension (or null for all) if last modified date is older than given long-date.
      Parameters:
      aDir -
      aExtension -
      aOlderThanMillis -
      Returns:
      success
    • getDirContents

      public static final Collection<File> getDirContents(File aDir, String aExtension, long aOlderThanMillis)
      Parameters:
      aDir -
      aExtension -
      aOlderThanMillis -
      Returns:
      Collection of Files fitting given criteria
    • getDirectoriesOnly

      public static final List<File> getDirectoriesOnly(File aDir, boolean aRecursive)
      Parameters:
      aDir -
      aRecursive -
      Returns:
      Collection of Directories in aDir
    • deleteDirContents

      public static final boolean deleteDirContents(File aDir, String aExtension)
      Deletes all the files in a directory including the sub directories files, if the given file is a directory but does not delete the directory itself.It only deletes files with given extension
      Parameters:
      aDir -
      aExtension -
      Returns:
      success
    • returnValidFilename

      public static final String returnValidFilename(String aUncheckedFilename)
      Replaces all letters that are maybe not supported by system for using in filename. You should only give the filename without path!!!
      Parameters:
      aUncheckedFilename -
      Returns:
      valid file name
    • returnValidPath

      public static final String returnValidPath(String aUncheckedFilename)
      Replaces all letters that are maybe not supported by system for using in filename. You should only give the filename without path!!! If add/remove characters also change isValidFilename/getInvalidFilenameCharacters
      Parameters:
      aUncheckedFilename -
      Returns:
      valid file name
    • isValidFilename

      public static final boolean isValidFilename(String aFilename)
      You should only give the filename without path!!! If add/remove characters also change returnValidPath/getInvalidFilenameCharacters
      Parameters:
      aFilename -
      Returns:
      if the given filename is valid
    • getInvalidFilenameCharacters

      public static final String getInvalidFilenameCharacters()
      If add/remove characters also change returnValidPath/isValidFilename
      Returns:
      a string containing all invalid characters.
    • getFileSizeString

      public static String getFileSizeString(long aByte)
      Parameters:
      aByte -
      Returns:
      a string describing the given byte size
    • getHostNameOfLocalSystem

      public static String getHostNameOfLocalSystem() throws UnknownHostException
      Returns:
      HostName of localhost.
      Throws:
      UnknownHostException
    • getIPOfLocalSystem

      public static String getIPOfLocalSystem() throws UnknownHostException
      Returns:
      IP of localhost.
      Throws:
      UnknownHostException
    • getTemporaryExecutionFilePath

      public static String getTemporaryExecutionFilePath(String aFilePath) throws IOException
      Parameters:
      aFilePath -
      Returns:
      If the File with the path is used by an other program a new one wit ~x is created and returned
      Throws:
      IOException
    • doesPatternFit

      public static boolean doesPatternFit(String aFileName, List<String> aPatternList, boolean aIgnoreCase)
      Parameters:
      aFileName -
      aPatternList -
      aIgnoreCase -
      Returns:
      if the given text fits to any of the given patterns.
    • doesPatternFit

      public static boolean doesPatternFit(String aFileName, String aPattern, boolean aIgnoreCase)
      Parameters:
      aFileName -
      aPattern -
      aIgnoreCase -
      Returns:
      if the given patterns fit .
    • getRelativePath

      public static String getRelativePath(File aFromDir, File aToFileOrDir) throws IOException
      Parameters:
      aFromDir -
      aToFileOrDir -
      Returns:
      the relative path. The first file is the directory, the second is the file.
      Throws:
      IOException
    • fillFileCollection

      public static Collection<File> fillFileCollection(File aDirectory, Collection<File> aFileCollection, boolean aIncludeDirectories)
      Parameters:
      aDirectory -
      aFileCollection -
      aIncludeDirectories -
      Returns:
      all files from the collection including dirs if wanted.
    • fillFileCollection

      public static Collection<File> fillFileCollection(File aDirectory, Collection<File> aFileCollection, String aExtensionFilter)
      Parameters:
      aDirectory -
      aFileCollection -
      aExtensionFilter -
      Returns:
      all files from the collection without directories but only with given Extension - without extension all files are returned.
    • fillFileCollection

      public static Collection<File> fillFileCollection(File aDirectory, boolean aIncludeDirectories, String aExtensionFilter)
      Parameters:
      aDirectory -
      aIncludeDirectories -
      aExtensionFilter -
      Returns:
      all files from the collection without directories but only with given Extension - without extension all files are returned.
    • getFileSize

      public static long getFileSize(File aFile, boolean aRecursive)
      Returns the size of the given file. If its a directory it will return the total size of all files in it (including the sub directories).
      Parameters:
      aFile -
      aRecursive -
      Returns:
      file size
    • getFilesWithExtension

      public static ArrayList<File> getFilesWithExtension(File aDirectory, String aExtension)
      Parameters:
      aDirectory - Directory in which too search
      aExtension - Extension to look for
      Returns:
      all files in a directory with a given extension
    • getFilesWithExtension

      public static ArrayList<File> getFilesWithExtension(File aDirectory, String aExtension, boolean aIncludeSubDirs)
      Parameters:
      aDirectory - Directory in which too search
      aExtension - Extension to look for
      aIncludeSubDirs -
      Returns:
      all files in a directory with a given extension
    • getBytesFromFile

      public static byte[] getBytesFromFile(File aFile) throws IOException
      Parameters:
      aFile -
      Returns:
      the contents of the file in a byte array.
      Throws:
      IOException
      IllegalArgumentException - if the file length is more than Integer.MAX_VALUE
    • isInDirectory

      public static boolean isInDirectory(File aFile, File aDirectory)
      Parameters:
      aFile -
      aDirectory -
      Returns:
      if the given file is a subfile/-directory of the given directory.
    • createLockFile

      public static boolean createLockFile(File aDirectory)
      Locks the system.
      Parameters:
      aDirectory -
      Returns:
      success
    • getFile

      public static File getFile(Collection<File> aFileCollection, String aFileName)
      Parameters:
      aFileCollection -
      aFileName -
      Returns:
      the given fileList for the also given fileName.
    • checkURL

      public static URL checkURL(String aURL)
      Parameters:
      aURL -
      Returns:
      the checked URL or null or MalformedURLException
    • chooseFile

      public static File chooseFile(String aExtension)
      Parameters:
      aExtension -
      Returns:
      the chosen file
    • doesFileExist

      public static boolean doesFileExist(String aPath, boolean aSouldAcceptDirectories)
      Parameters:
      aPath -
      aSouldAcceptDirectories -
      Returns:
      if File exists
    • readCSVtoArray

      public static String[][] readCSVtoArray(File aFile, String aDivider, boolean aIncludeHeader) throws IOException
      Parameters:
      aFile -
      aDivider -
      aIncludeHeader -
      Returns:
      the content of the CSV as Array
      Throws:
      IOException
    • readCSVtoArray

      public static String[][] readCSVtoArray(InputStream aInputStream, String aDivider, boolean aIncludeHeader) throws IOException
      Parameters:
      aInputStream -
      aDivider -
      aIncludeHeader -
      Returns:
      the content of the CSV as Array
      Throws:
      IOException
    • resizeArray

      public static Object resizeArray(Object oldArray, int newSize)
      Reallocates an array with a new size, and copies the contents of the old array to the new array.
      Parameters:
      oldArray - the old array, to be reallocated.
      newSize - the new array size.
      Returns:
      A new array with the same contents.
    • writeArrayToFile

      public static <T> void writeArrayToFile(T[][] aSumOfCutValues, File aFile, String aSeperator) throws IOException
      Type Parameters:
      T -
      Parameters:
      aSumOfCutValues -
      aFile -
      aSeperator -
      Throws:
      IOException
    • fillWithZero

      public static <T extends Number> void fillWithZero(T[][] aValuesArray)
      Type Parameters:
      T -
      Parameters:
      aValuesArray -
    • setAuthentication

      public static void setAuthentication(String aUsername, String aPassword)
      Parameters:
      aUsername - the user name to set
      aPassword - according to the user name to set
    • cleanPath

      public static String cleanPath(String aFileName)
      Parameters:
      aFileName -
      Returns:
      the cleaned path
    • hasAuthentication

      public static boolean hasAuthentication()
      Returns:
    • combineAndGZipFiles

      public static File combineAndGZipFiles(String aAbsolutePath, List<File> aFilesForPattern, int aHeaderLinesToInclude) throws IOException
      Parameters:
      aAbsolutePath -
      aFilesForPattern -
      aHeaderLinesToInclude -
      Returns:
      Throws:
      IOException