FileMatchProcessorAny@FunctionalInterface public interface FileMatchProcessorWithContext extends FileMatchProcessorAny
| Modifier and Type | Method | Description |
|---|---|---|
void |
processMatch(File classpathElt,
String relativePath,
InputStream inputStream,
long lengthBytes) |
Process a file with a matching filename or path.
|
void processMatch(File classpathElt, String relativePath, InputStream inputStream, long lengthBytes) throws IOException
You can get a fully-qualified URL for the file (even for files inside jars) by calling ClasspathUtils.getClasspathResourceURL(classpathElt, relativePath)
classpathElt - The classpath element that contained the match (a jarfile or directory). If null, the classpath
element was a module.relativePath - The path of the matching file relative to the classpath element that contained the match.inputStream - An InputStream (either a FileInputStream or a ZipEntry InputStream) opened on the file. You do not
need to close this InputStream before returning, it is closed by the caller.lengthBytes - The length of the InputStream in bytes.IOException - If anything goes wrong while processing the file.Copyright © 2018. All rights reserved.