Class FileResourceCreator

    • Constructor Detail

      • FileResourceCreator

        public FileResourceCreator()
    • Method Detail

      • createResource

        public final OutputStream createResource​(String resourceName)
                                          throws IOException
        Description copied from interface: ResourceCreator
        Creates the designated resource.
        Specified by:
        createResource in interface ResourceCreator
        Parameters:
        resourceName - Designates the resource; typically structured by slashes ("/") like "com/foo/pkg/Bar.class"
        Returns:
        Bytes written to this OutputStream are stored in the resource
        Throws:
        IOException - Problems creating the resource
      • deleteResource

        public final boolean deleteResource​(String resourceName)
        Description copied from interface: ResourceCreator
        Deletes the resource with the given name.
        Specified by:
        deleteResource in interface ResourceCreator
        Returns:
        false if the resource could not be deleted
      • getFile

        protected abstract File getFile​(String resourceName)
        Returns:
        The file into which the contents is written