com.versionone.utils

## Class V1Util

- java.lang.Object
- - com.versionone.utils.V1Util

-     public final class V1Util
      extends Object

  Set of units.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> T[]` | `convertListToArray(List<?> oids, Class<T> clazz)`
    `static String` | `convertSystemCrToXmlCr(String string)` Converts system specific end-of-line characters to xml specific end-of-line characters.
    `static String` | `convertXmlCrToSystemCr(String string)` Converts xml specific end-of-line characters to system specific end-of-line characters.
    `static void` | `copyStream(InputStream input, OutputStream output)` Coping data(binary type) from `input` stream to `output` stream.
    `static void` | `copyStream(InputStream input, OutputStream output, int buffersize)` Coping data(binary type) from `input` stream to `output` stream.
    `static void` | `copyStream(Reader input, Writer output)` Coping data(character type) from `input` reader to `output` writer.
    `static void` | `copyStream(Reader input, Writer output, int buffersize)` Coping data(character type) from `input` reader to `output` writer.
    `static boolean` | `equals(Object o1, Object o2)` Verification of equivalence of the objects.
    `static boolean` | `isNullOrEmpty(String string)` Verify - is string empty or null?

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

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

- - ### Method Detail

    - #### equals

          public static boolean equals(Object o1,
                                       Object o2)

      Verification of equivalence of the objects.
      Parameters:
        `o1` - first object.
        `o2` - second object.
      Returns:
        true if reference of the objects is equals or internal form of first object equals internal form of second object, false otherwise.

    - #### copyStream

          public static void copyStream(Reader input,
                                        Writer output)
                                 throws IOException

      Coping data(character type) from `input` reader to `output` writer.
      Parameters:
        `input` - source of data.
        `output` - destination of data.
      Throws:
        `IOException` - if any errors occur during copying process.

    - #### copyStream

          public static void copyStream(InputStream input,
                                        OutputStream output)
                                 throws IOException

      Coping data(binary type) from `input` stream to `output` stream.
      Parameters:
        `input` - input source of data.
        `output` - destination of data.
      Throws:
        `IOException` - if any errors occur during copying process.

    - #### copyStream

          public static void copyStream(Reader input,
                                        Writer output,
                                        int buffersize)
                                 throws IOException,
                                        IllegalArgumentException

      Coping data(character type) from `input` reader to `output` writer.
      Parameters:
        `input` - input source of data.
        `output` - destination of data.
        `buffersize` - size of buffer with is using for data copy.
      Throws:
        `IOException` - if any errors occur during copying process.
        `IllegalArgumentException` - if `buffersize` less then 1.

    - #### copyStream

          public static void copyStream(InputStream input,
                                        OutputStream output,
                                        int buffersize)
                                 throws IOException,
                                        IllegalArgumentException

      Coping data(binary type) from `input` stream to `output` stream.
      Parameters:
        `input` - input source of data.
        `output` - destination of data.
        `buffersize` - size of buffer with is using for data copy.
      Throws:
        `IOException` - if any errors occur during copying process.
        `IllegalArgumentException` - if `buffersize` less then 1.

    - #### convertListToArray

          public static <T> T[] convertListToArray(List<?> oids,
                                                   Class<T> clazz)

      Type Parameters:
        `T` - type of result array.
      Parameters:
        `oids` - source list of elements.
        `clazz` - source class of result array.
      Returns:
        resulting array.

    - #### isNullOrEmpty

          public static boolean isNullOrEmpty(String string)

      Verify - is string empty or null?
      Parameters:
        `string` - string for verifying.
      Returns:
        true if string is not empty in the other case return false.

    - #### convertSystemCrToXmlCr

          public static String convertSystemCrToXmlCr(String string)

      Converts system specific end-of-line characters to xml specific end-of-line characters.
      Parameters:
        `string` - string to process.
      Returns:
        string with xml specific end-of-line characters.

    - #### convertXmlCrToSystemCr

          public static String convertXmlCrToSystemCr(String string)

      Converts xml specific end-of-line characters to system specific end-of-line characters.
      Parameters:
        `string` - string to process.
      Returns:
        string with system specific end-of-line characters.

Copyright © 2020 VersionOne, Inc.. All rights reserved.