public enum ResourceStreamProvider extends Enum<ResourceStreamProvider>
| Enum Constant and Description |
|---|
ClassLoader
The ClassLoader provider uses
ClassLoader.getResourceAsStream(String) with a custom
AbstractResourceStream implementation. |
Url
The Url provider uses a
UrlResourceStream to load
a resource. |
| Modifier and Type | Method and Description |
|---|---|
static ResourceStreamProvider |
bestFitting() |
abstract IResourceStreamProvider |
newInstance(ClassLoader... classLoaders)
creates a new
IResourceStreamProvider instance according to
this instance. |
static ResourceStreamProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResourceStreamProvider[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResourceStreamProvider ClassLoader
ClassLoader.getResourceAsStream(String) with a custom
AbstractResourceStream implementation.public static final ResourceStreamProvider Url
UrlResourceStream to load
a resource. This provider can't be used on GAE, because it uses URL.openConnection().public static ResourceStreamProvider[] values()
for (ResourceStreamProvider c : ResourceStreamProvider.values()) System.out.println(c);
public static ResourceStreamProvider valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract IResourceStreamProvider newInstance(ClassLoader... classLoaders)
IResourceStreamProvider instance according to
this instance.classLoaders - the class loaders to use to load/find resourcesIResourceStreamProvider instancepublic static ResourceStreamProvider bestFitting()
ResourceStreamProviderCopyright © 2015 agilecoders.de. All Rights Reserved.