| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final FileSystemProvider |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | consumeAsPath(URL
resource url url, Consumer<Path> resource path consumer consumer)Attempts to represent a resource as a local file system path to be processed by a consumer. |
| public static void | consumeAsPaths(String
resource path resource, Consumer<Path> resource path consumer consumer)Invokes |
| public static void | consumeAsPaths(ClassLoader
classloader to load the resources from cl, String resource path resource, Consumer<Path> resource path consumer consumer)Locates specified resources on the classpath and attempts to represent them as local file system paths to be processed by a consumer. |
| public static void | consumeAsStreams(String
resource path resource, Consumer<InputStream> resource input stream consumer consumer)Invokes |
| public static void | consumeAsStreams(ClassLoader
classloader to load the resources from cl, String resource path resource, Consumer<InputStream> resource input stream consumer consumer)Locates all the occurrences of a resource on the classpath of the provided classloader and invokes the consumer providing the input streams for each located resource. |
| public static void | consumeStream(URL
URL url, Consumer<InputStream> input stream consumer consumer)Invokes a consumer providing the input streams to read the content of the URL. |
| private static <R> R | |
| public static < the result type R> R | Returns: the result of the functionresource url url, Function<Path, R> resource path function function)Attempts to represent a resource as a local file system path to be processed by a function. |
| public static < the result type R> R | Returns: the result of the functionURL url, Function<InputStream, R> input stream processing function function)Invokes a function providing the input streams to read the content of the URL. |
| public static Path | Returns: local file system pathURL url)Translates a URL to local file system path. |
| FILE | back to summary |
|---|---|
| private static final String FILE | |
| JAR | back to summary |
|---|---|
| private static final String JAR | |
| JAR_PROVIDER | back to summary |
|---|---|
| private static final FileSystemProvider JAR_PROVIDER | |
| ClassPathUtils | back to summary |
|---|---|
| private ClassPathUtils() | |
| consumeAsPath | back to summary |
|---|---|
| public static void consumeAsPath(URL url, Consumer<Path> consumer) Attempts to represent a resource as a local file system path to be processed by a consumer.
If a resource appears to be an actual file or a directory, it is simply passed to the consumer as-is.
If a resource is an entry in a JAR, the entry will be resolved as an instance
of | |
| consumeAsPaths | back to summary |
|---|---|
| public static void consumeAsPaths(String resource, Consumer<Path> consumer) throws IOException Invokes
| |
| consumeAsPaths | back to summary |
|---|---|
| public static void consumeAsPaths(ClassLoader cl, String resource, Consumer<Path> consumer) throws IOException Locates specified resources on the classpath and attempts to represent them as local file system paths
to be processed by a consumer. If a resource appears to be an actual file or a directory, it is simply
passed to the consumer as-is. If a resource is an entry in a JAR, the entry will be resolved as an instance
of
| |
| consumeAsStreams | back to summary |
|---|---|
| public static void consumeAsStreams(String resource, Consumer<InputStream> consumer) throws IOException Invokes
| |
| consumeAsStreams | back to summary |
|---|---|
| public static void consumeAsStreams(ClassLoader cl, String resource, Consumer<InputStream> consumer) throws IOException Locates all the occurrences of a resource on the classpath of the provided classloader
and invokes the consumer providing the input streams for each located resource.
The consumer does not have to close the provided input stream.
This method was introduced to avoid calling
| |
| consumeStream | back to summary |
|---|---|
| public static void consumeStream(URL url, Consumer<InputStream> consumer) throws IOException Invokes a consumer providing the input streams to read the content of the URL.
The consumer does not have to close the provided input stream.
This method was introduced to avoid calling
| |
| processAsJarPath | back to summary |
|---|---|
| private static <R> R processAsJarPath(Path jarPath, String path, Function<Path, R> function) | |
| processAsPath | back to summary |
|---|---|
| public static <R> R processAsPath(URL url, Function<Path, R> function) Attempts to represent a resource as a local file system path to be processed by a function.
If a resource appears to be an actual file or a directory, it is simply passed to the function as-is.
If a resource is an entry in a JAR, the entry will be resolved as an instance
of | |
| readStream | back to summary |
|---|---|
| public static <R> R readStream(URL url, Function<InputStream, R> function) throws IOException Invokes a function providing the input streams to read the content of the URL.
The function does not have to close the provided input stream.
This method was introduced to avoid calling
| |
| toLocalPath | back to summary |
|---|---|
| public static Path toLocalPath(final URL url) Translates a URL to local file system path.
In case the URL couldn't be translated to a file system path,
an instance of | |