//# 0 errors, 342 messages
//#
/*
    //#ResourceManager.java:1:1: class: com.dmdirc.util.resourcemanager.ResourceManager
    //#ResourceManager.java:1:1: method: com.dmdirc.util.resourcemanager.ResourceManager.com.dmdirc.util.resourcemanager.ResourceManager__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.util.resourcemanager;

import com.dmdirc.logger.ErrorLevel;
import com.dmdirc.logger.Logger;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

/**
 * Provides a launch method independant way of accessing resources.
 */
public abstract class ResourceManager {
    //#ResourceManager.java:40: method: void com.dmdirc.util.resourcemanager.ResourceManager.com.dmdirc.util.resourcemanager.ResourceManager()
    //#ResourceManager.java:40: end of method: void com.dmdirc.util.resourcemanager.ResourceManager.com.dmdirc.util.resourcemanager.ResourceManager()
    
    /** Previously assigned ResourceManager. */
    private static ResourceManager me;
    
    /**
     * Returns an appropriate instance of ResourceManager.
     *
     * @return ResourceManager implementation
     */
    public static final synchronized ResourceManager getResourceManager() {
        if (me == null) {
    //#ResourceManager.java:51: method: ResourceManager com.dmdirc.util.resourcemanager.ResourceManager.getResourceManager()
    //#input(ResourceManager getResourceManager()): __Class_Obj.__Lock
    //#input(ResourceManager getResourceManager()): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(ResourceManager getResourceManager()): me
    //#output(ResourceManager getResourceManager()): me
    //#output(ResourceManager getResourceManager()): new ArrayList(ZipResourceManager#2) num objects
    //#output(ResourceManager getResourceManager()): new FileResourceManager(getResourceManager#1) num objects
    //#output(ResourceManager getResourceManager()): new FileResourceManager(getResourceManager#1).__Tag
    //#output(ResourceManager getResourceManager()): new FileResourceManager(getResourceManager#1).basePath
    //#output(ResourceManager getResourceManager()): new ZipFile(ZipResourceManager#1) num objects
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2) num objects
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2).__Tag
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2).entries
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2).zipFile
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3) num objects
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3).__Tag
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3).entries
    //#output(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3).zipFile
    //#output(ResourceManager getResourceManager()): return_value
    //#new obj(ResourceManager getResourceManager()): new ArrayList(ZipResourceManager#2)
    //#new obj(ResourceManager getResourceManager()): new FileResourceManager(getResourceManager#1)
    //#new obj(ResourceManager getResourceManager()): new ZipFile(ZipResourceManager#1)
    //#new obj(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2)
    //#new obj(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3)
    //#pre[1] (ResourceManager getResourceManager()): init'ed(me)
    //#presumption(ResourceManager getResourceManager()): init'ed(com.dmdirc.logger.ErrorLevel.MEDIUM)
    //#presumption(ResourceManager getResourceManager()): java.lang.ClassLoader:getResource(...)@52 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.ClassLoader:getResource(...)@61 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.ClassLoader:getResource(...)@66 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.System:getProperty(...)@69 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:currentThread(...)@52 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:currentThread(...)@61 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:currentThread(...)@66 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:getContextClassLoader(...)@52 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:getContextClassLoader(...)@61 != null
    //#presumption(ResourceManager getResourceManager()): java.lang.Thread:getContextClassLoader(...)@66 != null
    //#presumption(ResourceManager getResourceManager()): java.net.URL:getPath(...)@52 != null
    //#presumption(ResourceManager getResourceManager()): java.net.URLDecoder:decode(...)@56 != null
    //#post(ResourceManager getResourceManager()): me == One-of{old me, &new FileResourceManager(getResourceManager#1), &new ZipResourceManager(getResourceManager#2), &new ZipResourceManager(getResourceManager#3)}
    //#post(ResourceManager getResourceManager()): init'ed(me)
    //#post(ResourceManager getResourceManager()): return_value == me
    //#post(ResourceManager getResourceManager()): new ArrayList(ZipResourceManager#2) num objects <= 1
    //#post(ResourceManager getResourceManager()): new FileResourceManager(getResourceManager#1) num objects <= 1
    //#post(ResourceManager getResourceManager()): init'ed(new FileResourceManager(getResourceManager#1).__Tag)
    //#post(ResourceManager getResourceManager()): init'ed(new FileResourceManager(getResourceManager#1).basePath)
    //#post(ResourceManager getResourceManager()): new ZipFile(ZipResourceManager#1) num objects <= 1
    //#post(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#2) num objects <= 1
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#2).__Tag)
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#2).entries)
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#2).zipFile)
    //#post(ResourceManager getResourceManager()): new ZipResourceManager(getResourceManager#3) num objects <= 1
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#3).__Tag)
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#3).entries)
    //#post(ResourceManager getResourceManager()): init'ed(new ZipResourceManager(getResourceManager#3).zipFile)
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.zip.ZipFile
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.zip.ZipFile:entries
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.Enumeration:hasMoreElements
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.Enumeration:nextElement
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.zip.ZipEntry:getName
    //#unanalyzed(ResourceManager getResourceManager()): Effects-of-calling:java.util.List:add
    //#test_vector(ResourceManager getResourceManager()): me: Inverse{null}, Addr_Set{null}
    //#test_vector(ResourceManager getResourceManager()): java.lang.String:equals(...)@65: {0}, {1}
    //#test_vector(ResourceManager getResourceManager()): java.lang.String:equals(...)@68: {0}, {1}
    //#test_vector(ResourceManager getResourceManager()): java.lang.String:startsWith(...)@69: {0}, {1}
            String path = Thread.currentThread().getContextClassLoader().
                    getResource("com/dmdirc/Main.class").getPath();
            
            try {
                path = java.net.URLDecoder.decode(path, "UTF-8");
            } catch (UnsupportedEncodingException ex) {
                Logger.userError(ErrorLevel.MEDIUM, "Unable to decode path");
    //#ResourceManager.java:58: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.util.resourcemanager.ResourceManager
    //#    method: ResourceManager getResourceManager()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:userError(ErrorLevel, String)
            }
            
            final String protocol = Thread.currentThread().getContextClassLoader().
                    getResource("com/dmdirc/Main.class").getProtocol();
            
            try {
                if ("file".equals(protocol)) {
                    me = new FileResourceManager(Thread.currentThread().
                            getContextClassLoader().getResource("").getPath());
                } else if ("jar".equals(protocol)) {
                    if (System.getProperty("os.name").startsWith("Windows")) {
                        me = new ZipResourceManager(path.substring(6, path.length() - 23));
                    } else {
                        me = new ZipResourceManager(path.substring(5, path.length() - 23));
                    }
                }
            } catch (IOException ex) {
                Logger.appError(ErrorLevel.MEDIUM, "Unable to determine how DMDirc"
    //#ResourceManager.java:76: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.util.resourcemanager.ResourceManager
    //#    method: ResourceManager getResourceManager()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
                        + " has been executed", ex);
            }
        }
        return me;
    //#ResourceManager.java:80: end of method: ResourceManager com.dmdirc.util.resourcemanager.ResourceManager.getResourceManager()
    }
    
    /**
     * Returns a resource manager for the specified URL. The following URL types
     * are valid:
     * 
     * <ul>
     *  <li>file://path/</li>
     *  <li>zip://path/filename.zip</li>
     *  <li>jar://path/filename.jar</li>
     * </ul>
     *
     * @param url The URL for which a resource manager is required
     * @return A resource manager for the specified URL
     * 
     * @throws IOException if an IO Error occurs opening the file
     * @throws IllegalArgumentException if the URL type is not valid
     */
    public static final ResourceManager getResourceManager(final String url)
            throws IOException, IllegalArgumentException {
        if (url.startsWith("file://")) {
    //#ResourceManager.java:101: method: ResourceManager com.dmdirc.util.resourcemanager.ResourceManager.getResourceManager(String)
    //#input(ResourceManager getResourceManager(String)): url
    //#input(ResourceManager getResourceManager(String)): url._tainted
    //#output(ResourceManager getResourceManager(String)): java.lang.String:substring(...)._tainted
    //#output(ResourceManager getResourceManager(String)): new ArrayList(ZipResourceManager#2) num objects
    //#output(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1) num objects
    //#output(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1).__Tag
    //#output(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1).basePath
    //#output(ResourceManager getResourceManager(String)): new ZipFile(ZipResourceManager#1) num objects
    //#output(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2) num objects
    //#output(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).__Tag
    //#output(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).entries
    //#output(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).zipFile
    //#output(ResourceManager getResourceManager(String)): return_value
    //#new obj(ResourceManager getResourceManager(String)): java.lang.String:substring(...)
    //#new obj(ResourceManager getResourceManager(String)): new ArrayList(ZipResourceManager#2)
    //#new obj(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1)
    //#new obj(ResourceManager getResourceManager(String)): new ZipFile(ZipResourceManager#1)
    //#new obj(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2)
    //#pre[1] (ResourceManager getResourceManager(String)): url != null
    //#presumption(ResourceManager getResourceManager(String)): java.lang.String:startsWith(...)@103 == 1
    //#post(ResourceManager getResourceManager(String)): init'ed(java.lang.String:substring(...)._tainted)
    //#post(ResourceManager getResourceManager(String)): return_value in Addr_Set{&new ZipResourceManager(getResourceManager#2),&new FileResourceManager(getResourceManager#1)}
    //#post(ResourceManager getResourceManager(String)): new ArrayList(ZipResourceManager#2) num objects <= 1
    //#post(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1) num objects <= 1
    //#post(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1).__Tag == com/dmdirc/util/resourcemanager/FileResourceManager
    //#post(ResourceManager getResourceManager(String)): new FileResourceManager(getResourceManager#1).basePath == &java.lang.String:substring(...)
    //#post(ResourceManager getResourceManager(String)): new ZipFile(ZipResourceManager#1) num objects <= 1
    //#post(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2) num objects <= 1
    //#post(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).__Tag == com/dmdirc/util/resourcemanager/ZipResourceManager
    //#post(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).entries == &new ArrayList(ZipResourceManager#2)
    //#post(ResourceManager getResourceManager(String)): new ZipResourceManager(getResourceManager#2).zipFile == &new ZipFile(ZipResourceManager#1)
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:com.dmdirc.util.resourcemanager.ResourceManager
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.zip.ZipFile
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.zip.ZipFile:entries
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.Enumeration:hasMoreElements
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.Enumeration:nextElement
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.zip.ZipEntry:getName
    //#unanalyzed(ResourceManager getResourceManager(String)): Effects-of-calling:java.util.List:add
    //#test_vector(ResourceManager getResourceManager(String)): java.lang.String:startsWith(...)@101: {0}, {1}
    //#test_vector(ResourceManager getResourceManager(String)): java.lang.String:startsWith(...)@103: {1}, {0}
            return new FileResourceManager(url.substring(7));
        } else if (url.startsWith("jar://") || url.startsWith("zip://")) {
            return new ZipResourceManager(url.substring(6));
        } else {
            throw new IllegalArgumentException("Unknown resource manager type");
    //#ResourceManager.java:106: end of method: ResourceManager com.dmdirc.util.resourcemanager.ResourceManager.getResourceManager(String)
        }
    }
    
    /**
     * Writes a resource to a file.
     *
     * @param resource Resource to write
     * @param file File to write to
     *
     * @throws IOException if the write operation fails
     */
    public final void resourceToFile(final byte[] resource, final File file)
    throws IOException {
        final FileOutputStream out = new FileOutputStream(file, false);
    //#ResourceManager.java:120: method: void com.dmdirc.util.resourcemanager.ResourceManager.resourceToFile(byte[], File)
    //#input(void resourceToFile(byte[], File)): file
    //#input(void resourceToFile(byte[], File)): resource
        
        out.write(resource);
        
        out.flush();
        out.close();
    }
    //#ResourceManager.java:126: end of method: void com.dmdirc.util.resourcemanager.ResourceManager.resourceToFile(byte[], File)
       
    /**
     * Extracts the specified resource to the specified directory.
     *
     * @param resourceName The name of the resource to extract
     * @param directory The name of the directory to extract to
     * @param usePath If true, append the path of the files in the resource
     * to the extraction path
     *
     * @throws IOException if the write operation fails
     *
     * @return success of failure of the operation
     */
    public final boolean extractResource(final String resourceName,
            final String directory, final boolean usePath) throws IOException {
        final byte[] resource = getResourceBytes(resourceName);
    //#ResourceManager.java:142: method: bool com.dmdirc.util.resourcemanager.ResourceManager.extractResource(String, String, bool)
    //#ResourceManager.java:142: Warning: suspicious precondition
    //#    The precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.util.resourcemanager.ResourceManager
    //#    method: bool extractResource(String, String, bool)
    //#    suspicious precondition index: [5]
    //#input(bool extractResource(String, String, bool)): "."._tainted
    //#input(bool extractResource(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/FileResourceManager]
    //#input(bool extractResource(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/ResourceManager]
    //#input(bool extractResource(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/ZipResourceManager]
    //#input(bool extractResource(String, String, bool)): __Descendant_Table[others]
    //#input(bool extractResource(String, String, bool)): __Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(bool extractResource(String, String, bool)): com/dmdirc/util/resourcemanager/FileResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(bool extractResource(String, String, bool)): com/dmdirc/util/resourcemanager/FileResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(bool extractResource(String, String, bool)): com/dmdirc/util/resourcemanager/ZipResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(bool extractResource(String, String, bool)): com/dmdirc/util/resourcemanager/ZipResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(bool extractResource(String, String, bool)): directory
    //#input(bool extractResource(String, String, bool)): resourceName
    //#input(bool extractResource(String, String, bool)): resourceName._tainted
    //#input(bool extractResource(String, String, bool)): this
    //#input(bool extractResource(String, String, bool)): this.__Tag
    //#input(bool extractResource(String, String, bool)): this.basePath
    //#input(bool extractResource(String, String, bool)): this.zipFile
    //#input(bool extractResource(String, String, bool)): usePath
    //#output(bool extractResource(String, String, bool)): return_value
    //#pre[2] (bool extractResource(String, String, bool)): resourceName != null
    //#pre[5] (bool extractResource(String, String, bool)): this.__Tag in {com/dmdirc/util/resourcemanager/FileResourceManager, com/dmdirc/util/resourcemanager/ResourceManager, com/dmdirc/util/resourcemanager/ZipResourceManager}
    //#presumption(bool extractResource(String, String, bool)): java.lang.String:lastIndexOf(...)@165 <= 4_294_967_294
    //#post(bool extractResource(String, String, bool)): init'ed(return_value)
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileOutputStream
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:write
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:flush
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:close
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.File
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.File:length
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileInputStream:read
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.FileInputStream:close
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.util.zip.ZipEntry:getSize
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream:read
    //#unanalyzed(bool extractResource(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream:close
    //#test_vector(bool extractResource(String, String, bool)): usePath: {0}, {1}
    //#test_vector(bool extractResource(String, String, bool)): java.io.File:exists(...)@157: {1}, {0}
    //#test_vector(bool extractResource(String, String, bool)): java.io.File:exists(...)@161: {1}, {0}
    //#test_vector(bool extractResource(String, String, bool)): java.io.File:isDirectory(...)@169: {1}, {0}
    //#test_vector(bool extractResource(String, String, bool)): java.lang.String:indexOf(...)@150: {-2_147_483_648..-1}, {0..4_294_967_295}
        
        if (resource.length == 0) {
            return false;
        }
        
        File newDir;
        
        if (usePath && resourceName.indexOf('/') > -1) {
            newDir = new File(directory,
                    resourceName.substring(0, resourceName.lastIndexOf('/')) + "/");
        } else {
            newDir = new File(directory);
        }
        
        if (!newDir.exists()) {
            newDir.mkdirs();
        }
        
        if (!newDir.exists()) {
            return false;
        }
        
        final File newFile = new File(newDir,
                resourceName.substring(resourceName.lastIndexOf('/') + 1,
                resourceName.length()));
        
        if (!newFile.isDirectory()) {
            resourceToFile(resource, newFile);
        }
        
        return true;
    //#ResourceManager.java:173: end of method: bool com.dmdirc.util.resourcemanager.ResourceManager.extractResource(String, String, bool)
    }
    
    /**
     * Extracts the specified resources to the specified directory.
     *
     * @param resourcesPrefix The prefix of the resources to extract
     * @param directory The name of the directory to extract to
     * @param usePath If true, append the path of the files in the resource
     * to the extraction path
     *
     * @throws IOException if the write operation fails
     */
    public final void extractResources(final String resourcesPrefix,
            final String directory, final boolean usePath) throws IOException {
        final Map<String, byte[]> resourcesBytes =
    //#ResourceManager.java:188: method: void com.dmdirc.util.resourcemanager.ResourceManager.extractResources(String, String, bool)
    //#ResourceManager.java:188: Warning: suspicious precondition
    //#    The precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.util.resourcemanager.ResourceManager
    //#    method: void extractResources(String, String, bool)
    //#    suspicious precondition index: [4]
    //#input(void extractResources(String, String, bool)): "."._tainted
    //#input(void extractResources(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/FileResourceManager]
    //#input(void extractResources(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/ResourceManager]
    //#input(void extractResources(String, String, bool)): __Descendant_Table[com/dmdirc/util/resourcemanager/ZipResourceManager]
    //#input(void extractResources(String, String, bool)): __Descendant_Table[others]
    //#input(void extractResources(String, String, bool)): __Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String, bool)): __Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/FileResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/FileResourceManager.__Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/FileResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/ZipResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/ZipResourceManager.__Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String, bool)): com/dmdirc/util/resourcemanager/ZipResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(void extractResources(String, String, bool)): directory
    //#input(void extractResources(String, String, bool)): resourcesPrefix
    //#input(void extractResources(String, String, bool)): this
    //#input(void extractResources(String, String, bool)): this.__Tag
    //#input(void extractResources(String, String, bool)): this.basePath
    //#input(void extractResources(String, String, bool)): this.entries
    //#input(void extractResources(String, String, bool)): this.zipFile
    //#input(void extractResources(String, String, bool)): usePath
    //#pre[4] (void extractResources(String, String, bool)): this.__Tag in {com/dmdirc/util/resourcemanager/FileResourceManager, com/dmdirc/util/resourcemanager/ResourceManager, com/dmdirc/util/resourcemanager/ZipResourceManager}
    //#presumption(void extractResources(String, String, bool)): java.util.Iterator:next(...)@190 != null
    //#presumption(void extractResources(String, String, bool)): java.util.Map:entrySet(...)@190 != null
    //#presumption(void extractResources(String, String, bool)): java.util.Map_Entry:getKey(...)@191 != null
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileOutputStream
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:write
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:flush
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileOutputStream:close
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:length
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileInputStream:read
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.FileInputStream:close
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:listFiles
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.Arrays:asList
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:isFile
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:getFileListing
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:getPath
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:getResourceBytes
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.String:lastIndexOf
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.zip.ZipEntry:getSize
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream:read
    //#unanalyzed(void extractResources(String, String, bool)): Effects-of-calling:java.io.BufferedInputStream:close
    //#test_vector(void extractResources(String, String, bool)): java.util.Iterator:hasNext(...)@190: {0}, {1}
                getResourcesStartingWithAsBytes(resourcesPrefix);
        for (Entry<String, byte[]> entry : resourcesBytes.entrySet()) {
            extractResource(entry.getKey(), directory, usePath);
        }
    }
    //#ResourceManager.java:193: end of method: void com.dmdirc.util.resourcemanager.ResourceManager.extractResources(String, String, bool)
    
    /**
     * Extracts the specified resources to the specified directory.
     *
     * @param resourcesPrefix The prefix of the resources to extract
     * @param directory The name of the directory to extract to
     *
     * @throws IOException if the write operation fails
     */
    public final void extractResources(final String resourcesPrefix,
            final String directory) throws IOException {
        extractResources(resourcesPrefix, directory, true);
    //#ResourceManager.java:205: method: void com.dmdirc.util.resourcemanager.ResourceManager.extractResources(String, String)
    //#ResourceManager.java:205: Warning: suspicious precondition
    //#    The precondition for this.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.util.resourcemanager.ResourceManager
    //#    method: void extractResources(String, String)
    //#    suspicious precondition index: [4]
    //#input(void extractResources(String, String)): "."._tainted
    //#input(void extractResources(String, String)): __Descendant_Table[com/dmdirc/util/resourcemanager/FileResourceManager]
    //#input(void extractResources(String, String)): __Descendant_Table[com/dmdirc/util/resourcemanager/ResourceManager]
    //#input(void extractResources(String, String)): __Descendant_Table[com/dmdirc/util/resourcemanager/ZipResourceManager]
    //#input(void extractResources(String, String)): __Descendant_Table[others]
    //#input(void extractResources(String, String)): __Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String)): __Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/FileResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/FileResourceManager.__Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/FileResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/ZipResourceManager.__Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/ZipResourceManager.__Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#input(void extractResources(String, String)): com/dmdirc/util/resourcemanager/ZipResourceManager.com.dmdirc.logger.ErrorLevel.LOW
    //#input(void extractResources(String, String)): directory
    //#input(void extractResources(String, String)): resourcesPrefix
    //#input(void extractResources(String, String)): this
    //#input(void extractResources(String, String)): this.__Tag
    //#input(void extractResources(String, String)): this.basePath
    //#input(void extractResources(String, String)): this.entries
    //#input(void extractResources(String, String)): this.zipFile
    //#pre[4] (void extractResources(String, String)): this.__Tag in {com/dmdirc/util/resourcemanager/FileResourceManager, com/dmdirc/util/resourcemanager/ResourceManager, com/dmdirc/util/resourcemanager/ZipResourceManager}
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.String:length
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.String:substring
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileOutputStream
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileOutputStream:write
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileOutputStream:flush
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileOutputStream:close
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:getResourcesStartingWithAsBytes
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:exists
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:isDirectory
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:length
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileInputStream
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileInputStream:read
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.FileInputStream:close
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.Throwable:__curr_excep_obj
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:com.dmdirc.logger.Logger:userError
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.ArrayList
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:listFiles
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Arrays:asList
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.List:iterator
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Iterator:hasNext
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Iterator:next
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:isFile
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.List:add
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:getFileListing
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.List:addAll
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.HashMap
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:getPath
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Map:put
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Map:entrySet
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Set:iterator
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.Map$Entry:getKey
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:extractResource
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:getResourceBytes
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.String:indexOf
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.StringBuilder
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.String:lastIndexOf
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.StringBuilder:append
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.lang.StringBuilder:toString
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.File:mkdirs
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.zip.ZipFile:getEntry
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.zip.ZipEntry:isDirectory
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.zip.ZipEntry:getSize
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.util.zip.ZipFile:getInputStream
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.BufferedInputStream
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.BufferedInputStream:read
    //#unanalyzed(void extractResources(String, String)): Effects-of-calling:java.io.BufferedInputStream:close
    }
    //#ResourceManager.java:206: end of method: void com.dmdirc.util.resourcemanager.ResourceManager.extractResources(String, String)
    
    /**
     * Checks if a resource exists.
     * 
     * @param resource Resource to check
     * 
     * @return true iif the resource exists
     */
    public abstract boolean resourceExists(final String resource);
    
    /**
     * Gets a byte[] of the specified resource.
     *
     * @param resource Name of the resource to return
     *
     * @return byte[] for the resource, or an empty byte[] if not found
     */
    public abstract byte[] getResourceBytes(final String resource);
    
    /**
     * Gets an InputStream for the specified resource.
     *
     * @param resource Name of the resource to return
     *
     * @return InputStream for the resource, or null if not found
     */
    public abstract InputStream getResourceInputStream(final String resource);
    
    /**
     * Gets a Map of byte[]s of the resources ending with the specified
     * suffix.
     *
     * @param resourcesSuffix Suffix of the resources to return
     * @since 0.6
     * @return Map of byte[]s of resources found
     */
    public abstract Map<String, byte[]> getResourcesEndingWithAsBytes(
            final String resourcesSuffix);
    
    /**
     * Gets a Map of byte[]s of the resources starting with the specified
     * prefix.
     *
     * @param resourcesPrefix Prefix of the resources to return
     *
     * @return Map of byte[]s of resources found
     */
    public abstract Map<String, byte[]> getResourcesStartingWithAsBytes(
            final String resourcesPrefix);
    
    /**
     * Gets a Map of InputStreams of the resources starting with the specified
     * prefix.
     *
     * @param resourcesPrefix Prefix of the resources to return
     *
     * @return Map of InputStreams of resources found
     */
    public abstract Map<String, InputStream> getResourcesStartingWithAsInputStreams(
            final String resourcesPrefix);
    
    /**
     * Gets a List of the resources starting with the specified
     * prefix.
     *
     * @param resourcesPrefix Prefix of the resources to return
     *
     * @return List of resources found
     */
    public abstract List<String> getResourcesStartingWith(final String resourcesPrefix);
}
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Descendant_Table[com/dmdirc/util/resourcemanager/ResourceManager]
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResource(Ljava/lang/String;Ljava/lang/String;Z)Z
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResources(Ljava/lang/String;Ljava/lang/String;)V
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResources(Ljava/lang/String;Ljava/lang/String;Z)V
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourceInputStream(Ljava/lang/String;)Ljava/io/InputStream;
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesEndingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWith(Ljava/lang/String;)Ljava/util/List;
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map;
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWithAsInputStreams(Ljava/lang/String;)Ljava/util/Map;
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.resourceExists(Ljava/lang/String;)Z
    //#output(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.resourceToFile([BLjava/io/File;)V
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Descendant_Table[com/dmdirc/util/resourcemanager/ResourceManager] == &__Dispatch_Table
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResource(Ljava/lang/String;Ljava/lang/String;Z)Z == &extractResource
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResources(Ljava/lang/String;Ljava/lang/String;)V == &extractResources
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.extractResources(Ljava/lang/String;Ljava/lang/String;Z)V == &extractResources
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourceBytes(Ljava/lang/String;)[B == &getResourceBytes
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourceInputStream(Ljava/lang/String;)Ljava/io/InputStream; == &getResourceInputStream
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesEndingWithAsBytes(Ljava/lang/String;)Ljava/util/Map; == &getResourcesEndingWithAsBytes
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWith(Ljava/lang/String;)Ljava/util/List; == &getResourcesStartingWith
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWithAsBytes(Ljava/lang/String;)Ljava/util/Map; == &getResourcesStartingWithAsBytes
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.getResourcesStartingWithAsInputStreams(Ljava/lang/String;)Ljava/util/Map; == &getResourcesStartingWithAsInputStreams
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.resourceExists(Ljava/lang/String;)Z == &resourceExists
    //#post(com.dmdirc.util.resourcemanager.ResourceManager__static_init): __Dispatch_Table.resourceToFile([BLjava/io/File;)V == &resourceToFile
    //#ResourceManager.java:: end of method: com.dmdirc.util.resourcemanager.ResourceManager.com.dmdirc.util.resourcemanager.ResourceManager__static_init
    //#ResourceManager.java:: end of class: com.dmdirc.util.resourcemanager.ResourceManager
