code: public static Map<String,byte[]> storeDirectoryResourcesAsBytes( File directory, List<String> exclusionPatteners )
  	throws IOException {
  
  		if( ! directory.exists())
  			throw new IllegalArgumentException( "The resource directory was not found. " + directory.getAbsolutePath());
  
  		if( ! directory.isDirectory())
  			throw new IllegalArgumentException( "The resource directory is not a valid directory. " + directory.getAbsolutePath());
  
  		Map<String,byte[]> result = new HashMap<> ();
  		List<File> resourceFiles = listAllFiles( directory, false );
  		fileLoop: for( File file : resourceFiles ) {
  
  			for( String exclusionPattern : exclusionPatteners ) {
  				if( file.getName().matches( exclusionPattern ))
  					continue fileLoop;
  			}
  
  			String key = computeFileRelativeLocation( directory, file );
  			ByteArrayOutputStream os = new ByteArrayOutputStream();
  			Utils.copyStream( file, os );
  			result.put( key, os.toByteArray());
  		}
  
  		return result;
  	}
docs: Stores the resources from a directory into a map.
  @param directory an existing directory
  @param exclusionPatteners a non-null list of exclusion patterns for file names (e.g. ".*\\.properties")
  @return a non-null map (key = the file location, relative to the directory, value = file content)
  @throws IOException if something went wrong while reading a file