|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.virtual.VFSUtils
public class VFSUtils
VFS Utilities
| Field Summary | |
|---|---|
static String |
VFS_LINK_NAME
|
static String |
VFS_LINK_PREFIX
|
static String |
VFS_LINK_TARGET
|
| Constructor Summary | |
|---|---|
VFSUtils()
|
|
| Method Summary | |
|---|---|
static void |
addManifestLocations(VirtualFile file,
List<VirtualFile> paths)
Add manifest paths |
static String |
fixName(String name)
Fix a name (removes any trailing slash) |
static Manifest |
getManifest(VFS archive)
Get a manifest from a virtual file system, assuming the root of the VFS is the root of an archive |
static Manifest |
getManifest(VirtualFile archive)
Get a manifest from a virtual file, assuming the virtual file is the root of an archive |
static String |
getName(URI uri)
|
static String |
getPathsString(Collection<VirtualFile> paths)
Get the paths string for a collection of virtual files |
static boolean |
isLink(String name)
Does a vf name contain the VFS link prefix |
static void |
parseLinkProperties(InputStream is,
List<LinkInfo> info,
Properties props)
Parse a properties link file |
static Map<String,String> |
parseURLQuery(String query)
Take a URL.getQuery string and parse it into name=value pairs |
static List<LinkInfo> |
readLinkInfo(InputStream is,
String name,
Properties props)
Read the link information from the stream based on the type as determined from the name suffix. |
static Manifest |
readManifest(VirtualFile manifest)
Read the manifest from given manifest VirtualFile. |
static URI |
toURI(URL url)
Deal with urls that may include spaces. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VFS_LINK_PREFIX
public static final String VFS_LINK_NAME
public static final String VFS_LINK_TARGET
| Constructor Detail |
|---|
public VFSUtils()
| Method Detail |
|---|
public static String getPathsString(Collection<VirtualFile> paths)
paths - the paths
IllegalArgumentException - for null paths
public static void addManifestLocations(VirtualFile file,
List<VirtualFile> paths)
throws IOException
file - the filepaths - the paths to add to
IOException - if there is an error reading the manifest or the
virtual file is closed
IllegalStateException - if the file has no parent
IllegalArgumentException - for a null file or paths
public static Manifest getManifest(VirtualFile archive)
throws IOException
archive - the root the archive
IOException - if there is an error reading the manifest or the
virtual file is closed
IllegalArgumentException - for a null archive
public static Manifest readManifest(VirtualFile manifest)
throws IOException
manifest - the VF to read from
IOException - if problems while opening VF stream occur
public static Manifest getManifest(VFS archive)
throws IOException
archive - the vfs
IOException - if there is an error reading the manifest
IllegalArgumentException - for a null archivepublic static String fixName(String name)
name - the name to fix
IllegalArgumentException - for a null namepublic static String getName(URI uri)
uri -
public static Map<String,String> parseURLQuery(String query)
query - Possibly empty/null url query string
public static boolean isLink(String name)
name - - the name portion of a virtual file
public static List<LinkInfo> readLinkInfo(InputStream is,
String name,
Properties props)
throws IOException,
URISyntaxException
is - - input stream to the link file contentsname - - the name of the virtual file representing the linkprops - the propertes
IOException - on failure to read/parse the stream
URISyntaxException - for an error parsing a URI
public static void parseLinkProperties(InputStream is,
List<LinkInfo> info,
Properties props)
throws IOException,
URISyntaxException
is - - input stream to the link file contentsinfo - the link infosprops - the propertes
IOException - on failure to read/parse the stream
URISyntaxException - for an error parsing a URI
public static URI toURI(URL url)
throws URISyntaxException
url - the url
URISyntaxException - for any error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||