org.jboss.virtual.plugins.context.jar
Class JarUtils

java.lang.Object
  extended by org.jboss.virtual.plugins.context.jar.JarUtils

public class JarUtils
extends Object

JarUtils.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Method Summary
static boolean addJarSuffix(String suffix)
          Add a jar suffix
static void clearSuffixes()
          Clear the list of suffixes
static URL createJarURL(URL url)
          Create a jar url from a normal url
static Set<String> getSuffixes()
          Get the lis of jar suffixes
static boolean isArchive(String name)
          Whether this is an archive
static boolean removeJarSuffix(String suffix)
          Remove a jar suffix
static void setJarSuffixes(Set<String> suffixes)
          Sets the jar suffixes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setJarSuffixes

public static void setJarSuffixes(Set<String> suffixes)
Sets the jar suffixes

Parameters:
suffixes - the suffixes
Throws:
IllegalArgumentException - for a null suffix

addJarSuffix

public static boolean addJarSuffix(String suffix)
Add a jar suffix

Parameters:
suffix - the suffix
Returns:
true when added
Throws:
IllegalArgumentException - for a null suffix

removeJarSuffix

public static boolean removeJarSuffix(String suffix)
Remove a jar suffix

Parameters:
suffix - the suffix
Returns:
true when removed
Throws:
IllegalArgumentException - for a null suffix

getSuffixes

public static Set<String> getSuffixes()
Get the lis of jar suffixes

Returns:
the list of suffixes

clearSuffixes

public static void clearSuffixes()
Clear the list of suffixes


isArchive

public static boolean isArchive(String name)
Whether this is an archive

Parameters:
name - the name
Returns:
true when an archive
Throws:
IllegalArgumentException - for a null name

createJarURL

public static URL createJarURL(URL url)
                        throws MalformedURLException
Create a jar url from a normal url

Parameters:
url - the normal url
Returns:
the jar url
Throws:
MalformedURLException - if the url is malformed
IllegalArgumentException - for a null url


Copyright © 2011 JBoss, A division of Red Hat, Inc. All Rights Reserved.