Class CameoUtilities

java.lang.Object
com.nomagic.license.utils.CameoUtilities
Direct Known Subclasses:
Utilities

@OpenApiAll public class CameoUtilities extends Object
General purpose utilities.
  • Constructor Details

    • CameoUtilities

      public CameoUtilities()
  • Method Details

    • isEqual

      public static boolean isEqual(@CheckForNull Object obj1, @CheckForNull Object obj2)
      Returns true of both objects are nulls or equal
      Parameters:
      obj1 - First object.
      obj2 - Second object.
      Returns:
      boolean
    • isEqual

      public static boolean isEqual(Object[] obj1, Object[] obj2)
      Returns true of both objects are nulls or equal
      Parameters:
      obj1 - object list.
      obj2 - object list.
      Returns:
      boolean
    • toString

      public static String toString(InputStream inputStream, @CheckForNull String encoding) throws IOException
      Get String representation of inputStream
      Parameters:
      inputStream - The given inputStream
      Returns:
      String representation.
      Throws:
      IOException
    • replaceNewLine

      public static String replaceNewLine(String string, String lineSeparator)
      Separate lines with the provided separator string.
      Parameters:
      string - input string.
      lineSeparator - line separator.
      Returns:
      result string.
    • copy

      public static void copy(Reader input, Writer output) throws IOException
      Copies all bytes from Reader into Writer. Closes the reader and writer.
      Parameters:
      input - the reader.
      output - the writer.
      Throws:
      IOException
    • copy

      public static void copy(InputStream input, OutputStream output) throws IOException
      Throws:
      IOException