com.comtrade.ecm.engine.io

## Class IOUtils

- java.lang.Object
- - com.comtrade.ecm.engine.io.IOUtils

-     public class IOUtils
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `convertPathSeparators(java.lang.String text, char newSeparator)`
    `static java.lang.String` | `convertPathToJavaSeparator(java.lang.String path)`
    `static java.lang.String` | `convertPathToNativeSeparator(java.lang.String path)`
    `static java.util.function.BiPredicate<java.nio.file.Path,java.nio.file.attribute.BasicFileAttributes>` | `createExtensionMatcher(java.lang.String fileExtension)`
    `static java.io.File` | `createFile(java.lang.String filename)`
    `static java.io.File` | `createFile(java.lang.String folderPath, java.lang.String filename)`
    `static boolean` | `createFolder(java.lang.String folderPath)`
    `static boolean` | `fileExists(java.lang.String filename)`
    `static java.io.InputStream` | `getResourceInputStream(java.lang.String path)` Returns an input stream for a `path` resource. Resource is searched in a file system.
    `static byte[]` | `readBytes(java.io.InputStream ios)`
    `static java.util.List<java.lang.String>` | `readLines(java.lang.String fileName)`
    `static void` | `writeBytes(java.lang.String filename, byte[] content)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### convertPathSeparators

          public static java.lang.String convertPathSeparators(java.lang.String text,
                                                               char newSeparator)

    - #### convertPathToNativeSeparator

          public static java.lang.String convertPathToNativeSeparator(java.lang.String path)

    - #### convertPathToJavaSeparator

          public static java.lang.String convertPathToJavaSeparator(java.lang.String path)

    - #### createFile

          public static java.io.File createFile(java.lang.String folderPath,
                                                java.lang.String filename)
                                         throws EcmException

      Throws:
        `EcmException`

    - #### createFolder

          public static boolean createFolder(java.lang.String folderPath)

    - #### readLines

          public static java.util.List<java.lang.String> readLines(java.lang.String fileName)
                                                            throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### fileExists

          public static boolean fileExists(java.lang.String filename)

    - #### createFile

          public static java.io.File createFile(java.lang.String filename)
                                         throws EcmException

      Throws:
        `EcmException`

    - #### createExtensionMatcher

          public static java.util.function.BiPredicate<java.nio.file.Path,java.nio.file.attribute.BasicFileAttributes> createExtensionMatcher(java.lang.String fileExtension)

    - #### readBytes

          public static byte[] readBytes(java.io.InputStream ios)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeBytes

          public static void writeBytes(java.lang.String filename,
                                        byte[] content)
                                 throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getResourceInputStream

          public static java.io.InputStream getResourceInputStream(java.lang.String path)

      Returns an input stream for a `path` resource.
      Resource is searched in a file system. If not found, then it is searched in java classpath.
      Parameters:
        `path` - Filename of a resource.
      Returns:
        An input stream related to a resource, if a resource is found.
        `null`, otherwise.