public static void extractJAR(LauncherAPI api, GameFile source, File file,
            File dest, int min, int max) throws Exception
    {
        JarFile jar = null;
        try
        {
            jar = new JarFile(file);
        }
        catch (final IOException e)
        {
            e.printStackTrace();
        }
        
        Enumeration<JarEntry> entries = jar.entries();
        
        int total = 0;
        while (entries.hasMoreElements())
        {
            final JarEntry entry = entries.nextElement();
            
            if (!entry.isDirectory()
                    && !entry.getName().equalsIgnoreCase("MANIFEST.MF"))
            {
                total += entry.getSize();
            }
        }
        
        entries = jar.entries();
        final int current = 0;
        
        while (entries.hasMoreElements())
        {
            final JarEntry entry = entries.nextElement();
            
            if (entry.isDirectory())
            {
                final File dir = new File(dest, entry.getName());
                if (!dir.exists()
                        && !dir.getName().equalsIgnoreCase("META-INF"))
                {
                    dir.mkdirs();
                }
            }
            else
            {
                final File e = new File(dest, entry.getName());
                if (!e.getParent().contains("META-INF"))
                {
                    copyStream(api, source, jar.getInputStream(entry),
                            new FileOutputStream(e), current, total, min, max);
                }
            }
        }
    }