Class CatalogHelper

java.lang.Object
org.apache.camel.catalog.impl.CatalogHelper

public final class CatalogHelper extends Object
  • Method Details

    • loadLines

      public static void loadLines(InputStream in, List<String> lines) throws IOException
      Loads the entire stream into memory as a String and returns it.

      Notice: This implementation appends a \n as line terminator at the of the text.

      Warning, don't use for crazy big streams :)

      Throws:
      IOException
    • loadLines

      public static List<String> loadLines(InputStream in) throws IOException
      Loads the entire stream into memory as a String and returns it.

      Notice: This implementation appends a \n as line terminator at the of the text.

      Warning, don't use for crazy big streams :)

      Throws:
      IOException
    • loadText

      public static String loadText(InputStream in) throws IOException
      Loads the entire stream into memory as a String and returns it.

      Notice: This implementation appends a \n as line terminator at the of the text.

      Warning, don't use for crazy big streams :)

      Throws:
      IOException
    • matchWildcard

      public static boolean matchWildcard(String name, String pattern)
      Matches the name with the pattern.
      Parameters:
      name - the name
      pattern - the pattern
      Returns:
      true if matched, or false if not
    • isEmpty

      public static boolean isEmpty(Object value)
      Tests whether the value is null or an empty string.
      Parameters:
      value - the value, if its a String it will be tested for text length as well
      Returns:
      true if empty
    • isNotEmpty

      public static boolean isNotEmpty(Object value)
      Tests whether the value is not null or an empty string.
      Parameters:
      value - the value, if its a String it will be tested for text length as well
      Returns:
      true if not empty