public final class RestConnectUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeAndRelease(org.mule.runtime.api.streaming.CursorProvider cursorProvider)
Closes the given
cursorProvider and releases all associated resources |
static void |
closeStream(Object stream)
|
static String |
consumeStringAndClose(Object stream,
String encoding)
Consumes the contents of the given
stream as a String and closes it. |
static boolean |
containsIgnoreCase(String value,
String predicate) |
static boolean |
isBlank(String value) |
static boolean |
isNotBlank(String v) |
public static void closeAndRelease(org.mule.runtime.api.streaming.CursorProvider cursorProvider)
cursorProvider and releases all associated resourcescursorProvider - a cursor providerpublic static void closeStream(Object stream)
stream which can be either a CursorProvider or an InputStream.
Null values or instances of other classes will be ignored.stream - a streampublic static String consumeStringAndClose(Object stream, String encoding)
stream as a String and closes it.
The stream can be either a CursorStreamProvider or an InputStream.
IllegalArgumentException will be thrown if the stream is an instance of any other class.
Notice that in the case of CursorStreamProvider, this method will close the provider meaning that it will no longer
be able to yield new cursors.
stream - a CursorStreamProvider or an InputStreamencoding - the encoding to use when reading the StringIllegalArgumentException - if stream is not of the expected types.public static boolean isBlank(String value)
public static boolean isNotBlank(String v)
Copyright © 2019. All rights reserved.