Class DefaultResourceProvider

    • Constructor Detail

      • DefaultResourceProvider

        public DefaultResourceProvider()
    • Method Detail

      • targetOut

        public OutputStream targetOut​(String fileName)
        Description copied from interface: ResourceProvider
        For the filename, provide a OutputStream to write the file to. Generally, this is a File in the maven resources/cache directory of the current application.
        Specified by:
        targetOut in interface ResourceProvider
        Parameters:
        fileName - The name of the file to write
        Returns:
        the OutputStream to write the file to
      • targetIn

        public InputStream targetIn​(String fileName)
        Description copied from interface: ResourceProvider
        For the filename, provide an InputStream from which to read the file. Generally, this is a resource on the classpath of the application in resources/cache.
        Specified by:
        targetIn in interface ResourceProvider
        Parameters:
        fileName - The name of the resource to fetch
        Returns:
        The InputStream from which to read the resource
      • contents

        public String[] contents()
        Description copied from interface: ResourceProvider
        All cache related artifact paths in the containing path
        Specified by:
        contents in interface ResourceProvider
        Returns:
        All cache related artifact paths in the containing path
      • getResourcePrefix

        public String getResourcePrefix()
        Description copied from interface: ResourceProvider
        The classloader prefix under which all cache resources are located
        Specified by:
        getResourcePrefix in interface ResourceProvider
        Returns:
        The classloader prefix under which all cache resources are located
      • determineOldResourceDir

        protected Optional<File> determineOldResourceDir()
        Retrieve archive directory if still exists at the old build location (src/main/resources/cache).
      • determineCacheResourceDir

        protected File determineCacheResourceDir()