Class ResourceContentLoader

  • All Implemented Interfaces:
    ContentLoader

    public class ResourceContentLoader
    extends Object
    implements ContentLoader
    Read the content by grabbing the resource relative to the root of the classpath of the name of the value.
    Since:
    1.0.0
    • Constructor Detail

      • ResourceContentLoader

        public ResourceContentLoader()
    • Method Detail

      • loadContent

        public String loadContent​(String value)
                           throws IOException
        Specified by:
        loadContent in interface ContentLoader
        Parameters:
        value - The literal string that represents a resource that should be loaded.
        Returns:
        The content to load from a given string intended to be added to MockResponse.setBody(String).
        Throws:
        IOException - If an exception occurs while loading the content.