Class SelectiveJarResource

All Implemented Interfaces:
Closeable, AutoCloseable, ResourceFactory

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

    • DEFAULT_INCLUDES

      public static final List<String> DEFAULT_INCLUDES
      Default matches every resource.
    • DEFAULT_EXCLUDES

      public static final List<String> DEFAULT_EXCLUDES
      Default is to exclude nothing.
  • Constructor Details

    • SelectiveJarResource

      public SelectiveJarResource(URL url)
    • SelectiveJarResource

      public SelectiveJarResource(URL url, boolean useCaches)
  • Method Details

    • setCaseSensitive

      public void setCaseSensitive(boolean caseSensitive)
    • setIncludes

      public void setIncludes(List<String> patterns)
    • setExcludes

      public void setExcludes(List<String> patterns)
    • isIncluded

      protected boolean isIncluded(String name)
    • isExcluded

      protected boolean isExcluded(String name)
    • copyTo

      public void copyTo(File directory) throws 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:
      IOException - if unable to copy the resource