Class SelectiveJarResource

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, ResourceFactory

    public class SelectiveJarResource
    extends JarResource
    SelectiveJarResource Selectively copies resources from a jar file based on includes/excludes.
    • Field Detail

      • DEFAULT_INCLUDES

        public static final java.util.List<java.lang.String> DEFAULT_INCLUDES
      • DEFAULT_EXCLUDES

        public static final java.util.List<java.lang.String> DEFAULT_EXCLUDES
    • Constructor Detail

      • SelectiveJarResource

        public SelectiveJarResource​(java.net.URL url)
      • SelectiveJarResource

        public SelectiveJarResource​(java.net.URL url,
                                    boolean useCaches)
    • Method Detail

      • setCaseSensitive

        public void setCaseSensitive​(boolean caseSensitive)
      • setIncludes

        public void setIncludes​(java.util.List<java.lang.String> patterns)
      • setExcludes

        public void setExcludes​(java.util.List<java.lang.String> patterns)
      • isIncluded

        protected boolean isIncluded​(java.lang.String name)
      • isExcluded

        protected boolean isExcluded​(java.lang.String name)
      • copyTo

        public void copyTo​(java.io.File directory)
                    throws java.io.IOException
        Description copied from class: Resource
        Copy the Resource to the new destination file.

        Will not replace existing destination file.

        Overrides:
        copyTo in class JarResource
        Parameters:
        directory - the destination file to create
        Throws:
        java.io.IOException - if unable to copy the resource
        See Also:
        JarResource.copyTo(java.io.File)