Class CameoUtilities

  • Direct Known Subclasses:
    Utilities

    @OpenApiAll
    public class CameoUtilities
    extends java.lang.Object
    General purpose utilities.
    • Constructor Summary

      Constructors 
      Constructor Description
      CameoUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void copy​(java.io.InputStream input, java.io.OutputStream output)  
      static void copy​(java.io.Reader input, java.io.Writer output)
      Copies all bytes from Reader into Writer.
      static boolean isEqual​(java.lang.Object[] obj1, java.lang.Object[] obj2)
      Returns true of both objects are nulls or equal
      static boolean isEqual​(java.lang.Object obj1, java.lang.Object obj2)
      Returns true of both objects are nulls or equal
      static java.lang.String replaceNewLine​(java.lang.String string, java.lang.String lineSeparator)
      Separate lines with the provided separator string.
      static java.lang.String toString​(java.io.InputStream inputStream, java.lang.String encoding)
      Get String representation of inputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CameoUtilities

        public CameoUtilities()
    • Method Detail

      • isEqual

        public static boolean isEqual​(@CheckForNull
                                      java.lang.Object obj1,
                                      @CheckForNull
                                      java.lang.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​(java.lang.Object[] obj1,
                                      java.lang.Object[] obj2)
        Returns true of both objects are nulls or equal
        Parameters:
        obj1 - object list.
        obj2 - object list.
        Returns:
        boolean
      • toString

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

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

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

        public static void copy​(java.io.InputStream input,
                                java.io.OutputStream output)
                         throws java.io.IOException
        Throws:
        java.io.IOException