public class ModuleExtractorUtils
extends java.lang.Object
| Constructor and Description |
|---|
ModuleExtractorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Module |
jsonStringToModule(java.lang.String json)
Given a serialized json module string, deserialize it into a Module object.
|
static java.lang.String |
moduleToJsonString(Module module)
Given a Module object, serialize it as a json string.
|
static Module |
readModuleFromFile(java.io.File fromFile)
Given a file, read its contents as a json string and deserialize it as a Module object.
|
static void |
saveModuleToFile(Module module,
java.io.File toFile)
Given a Module object, serialize it to a json string and write it to the provided file.
|
public static java.lang.String moduleToJsonString(Module module) throws java.io.IOException
module - The module to serializejava.io.IOExceptionpublic static Module jsonStringToModule(java.lang.String json) throws java.io.IOException
json - The serialized json module stringjava.io.IOExceptionpublic static void saveModuleToFile(Module module, java.io.File toFile) throws java.io.IOException
module - The module objecttoFile - The file to write the serialized module tojava.io.IOExceptionpublic static Module readModuleFromFile(java.io.File fromFile) throws java.io.IOException
fromFile - The file containing a serialized json stringjava.io.IOException