Class XmlFileService
java.lang.Object
lt.viko.eif.jguscia.services.XmlFileService
Service responsible for loading XML files from the application's resources.
<p>
Reads a resource file from the classpath and returns its contents as a UTF-8 string.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadXmlFromResources(String resourceName) Reads an XML file from the application resources.
-
Constructor Details
-
XmlFileService
public XmlFileService()
-
-
Method Details
-
readXmlFromResources
Reads an XML file from the application resources.- Parameters:
resourceName- name or path of the resource file- Returns:
- contents of the XML file as a string
- Throws:
IllegalArgumentException- if the resource name is null or blankIOException- if the resource cannot be found or read
-