aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2011-07-20 17:24:16 +0000
committerYana Stamcheva <yana@jitsi.org>2011-07-20 17:24:16 +0000
commitd09c66383886b5ecfae76499230ae800dd4c4666 (patch)
tree603162ac7b1e031bcf4672fc9cd5d4938778659a /src/net/java/sip/communicator/impl/resources/ResourceManagementServiceImpl.java
parentfd7ff7231237d62eabae6a490bebd0229fa76cac (diff)
downloadjitsi-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.java23
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.
*