Class ResourceUtils
java.lang.Object
org.alfresco.repo.search.impl.elasticsearch.contentmodelsync.utils.ResourceUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.json.JSONObjectreadJSONFromFile(String path, Class clazz) static org.json.JSONObjectreadJSONFromFile(Path path, Class clazz) Class argument needed for getResourceAsStream() method (this.getClass() cannot be used from static context)static org.json.JSONObjectreadJSONFromResource(org.springframework.core.io.Resource resource) static org.json.JSONObject[]readJSONsFromResources(org.springframework.core.io.Resource[] resources)
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
readJSONFromFile
Class argument needed for getResourceAsStream() method (this.getClass() cannot be used from static context)- Parameters:
path-clazz-- Returns:
- Throws:
IOException
-
readJSONFromFile
- Throws:
IOException
-
readJSONsFromResources
public static org.json.JSONObject[] readJSONsFromResources(org.springframework.core.io.Resource[] resources) throws IOException - Throws:
IOException
-
readJSONFromResource
public static org.json.JSONObject readJSONFromResource(org.springframework.core.io.Resource resource) throws IOException - Throws:
IOException
-