aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java')
-rw-r--r--src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java44
1 files changed, 5 insertions, 39 deletions
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
index 9217b0a..c3bb9b8 100644
--- a/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
+++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/Resources.java
@@ -6,12 +6,7 @@
*/
package net.java.sip.communicator.plugin.aimaccregwizz;
-import java.io.*;
-
import net.java.sip.communicator.service.resources.*;
-import net.java.sip.communicator.util.*;
-
-import org.osgi.framework.*;
/**
* The <tt>Resources</tt> class manages the access to the internationalization
@@ -21,8 +16,6 @@ import org.osgi.framework.*;
*/
public class Resources
{
- private static Logger log = Logger.getLogger(Resources.class);
-
private static ResourceManagementService resourcesService;
/**
@@ -52,42 +45,15 @@ public class Resources
*/
public static byte[] getImage(ImageID imageID)
{
- InputStream in =
- getResources().getImageInputStream(imageID.getId());
-
- if(in == null)
- return null;
-
- byte[] image = null;
-
- try
- {
- image = new byte[in.available()];
- in.read(image);
- }
- catch (IOException e)
- {
- log.error("Failed to load image:" + imageID, e);
- }
-
- return image;
+ return getResources().getImageInBytes(imageID.getId());
}
-
+
public static ResourceManagementService getResources()
{
if (resourcesService == null)
- {
- ServiceReference serviceReference = AimAccRegWizzActivator.bundleContext
- .getServiceReference(ResourceManagementService.class.getName());
-
- if(serviceReference == null)
- return null;
-
- resourcesService =
- (ResourceManagementService)AimAccRegWizzActivator.bundleContext
- .getService(serviceReference);
- }
-
+ resourcesService =
+ ResourceManagementServiceUtils
+ .getService(AimAccRegWizzActivator.bundleContext);
return resourcesService;
}
}