public class MarsUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
MarsUtil.ThrowingConsumer<T,E extends java.lang.Exception> |
Modifier and Type | Field and Description |
---|---|
static com.fasterxml.jackson.core.JsonFactory |
jFactory |
Constructor and Description |
---|
MarsUtil() |
Modifier and Type | Method and Description |
---|---|
static <T,E extends java.lang.Exception> |
catchConsumerException(MarsUtil.ThrowingConsumer<T,E> throwingConsumer,
java.lang.Class<E> exceptionType) |
static java.lang.String |
dumpJSON(MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonGenerator,java.io.IOException> throwingConsumer)
Return Json String in pretty print format.
|
static com.fasterxml.jackson.core.JsonFactory |
getJFactory() |
static void |
passThroughUnknownArrays(com.fasterxml.jackson.core.JsonParser jParser)
Used to bypass unknown Json arrays with JacksonJson streaming interface.
|
static void |
passThroughUnknownObjects(com.fasterxml.jackson.core.JsonParser jParser)
Used to bypass unknown Json objects with JacksonJson streaming interface.
|
static void |
readJsonObject(com.fasterxml.jackson.core.JsonParser jParser,
JsonConvertibleRecord record,
java.lang.String... objects) |
static void |
threadPoolBuilder(org.scijava.app.StatusService statusService,
org.scijava.log.LogService logService,
java.lang.Runnable updateStatus,
java.util.List<java.lang.Runnable> tasks,
int numThreads) |
static void |
updateJLabelTextInContainer(java.awt.Container parent,
java.lang.String searchForPrefix,
java.lang.String newText) |
static void |
writeJsonRecord(JsonConvertibleRecord record,
java.io.File file,
com.fasterxml.jackson.core.JsonFactory jFactory) |
static void |
writeJsonRecord(JsonConvertibleRecord record,
java.io.OutputStream outputStream,
com.fasterxml.jackson.core.JsonFactory jFactory) |
public static com.fasterxml.jackson.core.JsonFactory getJFactory()
public static void readJsonObject(com.fasterxml.jackson.core.JsonParser jParser, JsonConvertibleRecord record, java.lang.String... objects) throws java.io.IOException
java.io.IOException
public static void threadPoolBuilder(org.scijava.app.StatusService statusService, org.scijava.log.LogService logService, java.lang.Runnable updateStatus, java.util.List<java.lang.Runnable> tasks, int numThreads)
public static void updateJLabelTextInContainer(java.awt.Container parent, java.lang.String searchForPrefix, java.lang.String newText)
public static java.lang.String dumpJSON(MarsUtil.ThrowingConsumer<com.fasterxml.jackson.core.JsonGenerator,java.io.IOException> throwingConsumer)
throwingConsumer
- Consumer to generate JSON.public static void writeJsonRecord(JsonConvertibleRecord record, java.io.File file, com.fasterxml.jackson.core.JsonFactory jFactory) throws java.io.IOException
java.io.IOException
public static void writeJsonRecord(JsonConvertibleRecord record, java.io.OutputStream outputStream, com.fasterxml.jackson.core.JsonFactory jFactory) throws java.io.IOException
java.io.IOException
public static void passThroughUnknownObjects(com.fasterxml.jackson.core.JsonParser jParser) throws java.io.IOException
jParser
- JsonParser stream to processing pass through for.java.io.IOException
- Thrown if unable to parse Json from the JsonParser
given.public static void passThroughUnknownArrays(com.fasterxml.jackson.core.JsonParser jParser) throws java.io.IOException
jParser
- JsonParser stream to processing pass through for.java.io.IOException
- Thrown if unable to parse Json from the JsonParser
given.public static <T,E extends java.lang.Exception> java.util.function.Predicate<T> catchConsumerException(MarsUtil.ThrowingConsumer<T,E> throwingConsumer, java.lang.Class<E> exceptionType)