Resource objects.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
A |
| public static interface | ResourceList.
Filter a |
| Modifier and Type | Field and Description |
|---|---|
| private static final ResourceList. | CLASSFILE_FILTER
Returns true if a Resource has a path ending in ".class". |
| pack-priv static final ResourceList | EMPTY_LIST
An unmodifiable empty |
| pack-priv static final long | serialVersionUID
Hides io. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ResourceList(final int
the size hint sizeHint)Create a new modifiable empty list of |
| public | ResourceList(final Collection<Resource>
the collection of resourceCollection)Resource objects.Create a new modifiable empty |
| Modifier and Type | Method and Description |
|---|---|
| public Map | Returns: ThisResourceList as a map from resource path (obtained from Resource#getPath()) to a
ResourceList of Resource objects that have that path.Return this |
| public ResourceList | Returns: A newResourceList consisting of only the resources with the filename extension ".class".Return a new |
| public void | close()
Implements java. Close all the |
| public static ResourceList | |
| public ResourceList | Returns: The subset of theResource objects in this list for which the given filter predicate is true.The filterResourceFilter to apply.Find the subset of the |
| public List | Returns: AList of Entry objects for all resources in the classpath and/or module path that
have a non-unique path (i.e. where there are at least two resources with the same path). The key of
each returned Entry is the path (obtained from Resource#getPath()), and the value is
a ResourceList of at least two unique Resource objects that have that path.Find duplicate resource paths within this |
| public void | forEachByteArray(final ResourceList.
The byteArrayConsumer,ByteArrayConsumer.if true, any ignoreIOExceptions)IOException thrown while trying to load any of the resources will be silently
ignored.
Deprecated
Use
forEachByteArrayIgnoringIOException(ByteArrayConsumer) or
forEachByteArrayThrowingIOException(ByteArrayConsumerThrowsIOException) instead.
Fetch the content of each |
| public void | forEachByteArray(final ResourceList.
The byteArrayConsumerByteArrayConsumer.
Deprecated
Use
forEachByteArrayThrowingIOException(ByteArrayConsumerThrowsIOException) instead.
Fetch the content of each |
| public void | forEachByteArrayIgnoringIOException(final ResourceList.
The byteArrayConsumerByteArrayConsumer.Fetch the content of each |
| public void | forEachByteArrayThrowingIOException(final ResourceList.
Fetch the content of each |
| public void | forEachByteBuffer(final ResourceList.
The byteBufferConsumer,ByteBufferConsumer.if true, any ignoreIOExceptions)IOException thrown while trying to load any of the resources will be silently
ignored.
Deprecated
Use
forEachByteBufferIgnoringIOException(ByteBufferConsumer) or
forEachByteBufferThrowingIOException(ByteBufferConsumerThrowsIOException) instead.
Read each |
| public void | forEachByteBuffer(final ResourceList.
The byteBufferConsumerByteBufferConsumer.
Deprecated
Use
forEachByteBufferThrowingIOException(ByteBufferConsumerThrowsIOException) instead.
Read each |
| public void | forEachByteBufferIgnoringIOException(final ResourceList.
The byteBufferConsumerByteBufferConsumer.Read each |
| public void | forEachByteBufferThrowingIOException(final ResourceList.
Read each |
| public void | forEachInputStream(final ResourceList.
The inputStreamConsumer,InputStreamConsumer.if true, any ignoreIOExceptions)IOException thrown while trying to load any of the resources will be silently
ignored.
Deprecated
Use
forEachInputStreamIgnoringIOException(InputStreamConsumer) or
forEachInputStreamThrowingIOException(InputStreamConsumerThrowsIOException) instead.
Fetch an |
| public void | forEachInputStream(final ResourceList.
The inputStreamConsumerInputStreamConsumer.
Deprecated
Use
forEachInputStreamThrowingIOException(InputStreamConsumerThrowsIOException) instead.
Fetch an |
| public void | forEachInputStreamIgnoringIOException(final ResourceList.
The inputStreamConsumerInputStreamConsumer.Fetch an |
| public void | forEachInputStreamThrowingIOException(final ResourceList.
Fetch an |
| public ResourceList | Returns: AResourceList of Resource objects in this list that have the given path (there may
be more than one resource with a given path, from different classpath elements or modules, so this
returns a ResourceList rather than a single Resource.) Returns the empty list if no
resource with is found with a matching path.The path of a resource resourcePath)Returns a list of all resources with the requested path. |
| public List | Returns: The paths of all resources in this list relative to the package root, by callingResource#getPath() for each item in the list.Get the paths of all resources in this list relative to the package root. |
| public List | Returns: The paths of all resources in this list relative to the root of the classpath element, by callingResource#getPathRelativeToClasspathElement() for each item in the list.Get the paths of all resources in this list relative to the root of the classpath element. |
| public List | Returns: The URIs of all resources in this list.Get the URIs of all resources in this list, by calling |
| public List | Returns: The URLs of all resources in this list.Get the URLs of all resources in this list, by calling |
| public ResourceList | Returns: A newResourceList consisting of only the resources that do not have the filename extension
".class".Return a new |