Package org.implab.gradle.containers.cli
Class Utils
java.lang.Object
org.implab.gradle.containers.cli.Utils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcloseSilent(Closeable handle) static groovy.json.JsonGeneratorstatic booleanisNullOrEmptyString(String value) static Stringstatic StringreadAll(InputStream src) static StringreadAll(InputStream src, String charset) static ImageRefreadImageRef(File file) static <T> Tstatic voidredirectIO(InputStream src, File file) static voidredirectIO(InputStream src, org.gradle.api.Action<String> consumer) static StringtoJsonPretty(Object value) static <T> org.gradle.api.Action<T>wrapClosure(groovy.lang.Closure<?> closure) static void
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
redirectIO
-
redirectIO
-
closeSilent
-
readAll
- Throws:
IOException
-
readJson
- Throws:
IOException
-
writeJson
public static void writeJson(File file, Object value) throws com.fasterxml.jackson.core.exc.StreamWriteException, com.fasterxml.jackson.databind.DatabindException, IOException - Throws:
com.fasterxml.jackson.core.exc.StreamWriteExceptioncom.fasterxml.jackson.databind.DatabindExceptionIOException
-
readImageRef
- Throws:
FileNotFoundExceptionIOException
-
readAll
- Throws:
IOException
-
readAll
-
readAll
- Throws:
IOException
-
createDefaultJsonGenerator
public static groovy.json.JsonGenerator createDefaultJsonGenerator() -
toJsonPretty
-
isNullOrEmptyString
-
wrapClosure
public static <T> org.gradle.api.Action<T> wrapClosure(groovy.lang.Closure<?> closure)
-