Class MapResourceCreator

    • Constructor Detail

      • MapResourceCreator

        public MapResourceCreator()
        Auto-create the delegate Map.
      • MapResourceCreator

        public MapResourceCreator​(Map<String,​byte[]> map)
    • Method Detail

      • getMap

        public final Map<String,​byte[]> getMap()
        Returns:
        The String-to-byte[] map of the resources created
      • createResource

        public final OutputStream createResource​(String resourceName)
        Description copied from interface: ResourceCreator
        Create 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
      • 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