diff options
author | Yana Stamcheva <yana@jitsi.org> | 2011-07-20 17:24:16 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2011-07-20 17:24:16 +0000 |
commit | d09c66383886b5ecfae76499230ae800dd4c4666 (patch) | |
tree | 603162ac7b1e031bcf4672fc9cd5d4938778659a /src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java | |
parent | fd7ff7231237d62eabae6a490bebd0229fa76cac (diff) | |
download | jitsi-d09c66383886b5ecfae76499230ae800dd4c4666.zip jitsi-d09c66383886b5ecfae76499230ae800dd4c4666.tar.gz jitsi-d09c66383886b5ecfae76499230ae800dd4c4666.tar.bz2 |
Restores the create Jabber account form and fixes some related issues.
Diffstat (limited to 'src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java index 586b1e9..653f4eb 100644 --- a/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java +++ b/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java @@ -796,6 +796,29 @@ public class ResourceManagementServiceImpl } /** + * Returns a stream from a given identifier, obtained through the class + * loader of the given resourceClass. + * + * @param streamKey The identifier of the stream. + * @param resourceClass the resource class through which the resource would + * be obtained + * @return The stream for the given identifier. + */ + public InputStream getSettingsInputStream( String streamKey, + Class<?> resourceClass) + { + String path = settingsResources.get(streamKey); + + if (path == null || path.length() == 0) + { + logger.warn("Missing resource for key: " + streamKey); + return null; + } + + return resourceClass.getClassLoader().getResourceAsStream(path); + } + + /** * Returns the <tt>URL</tt> of the sound corresponding to the given * property key. * |