org.crsh.vfs.spi.url
Class Node
java.lang.Object
org.crsh.vfs.spi.url.Node
- All Implemented Interfaces:
- Iterable<Resource>
-
public class Node
- extends Object
-
- implements Iterable<Resource>
-
- Author:
Field Summary |
(package private) HashMap<String,Node> |
children
. |
(package private) File[] |
dirs
The lazy dires not yet processed. |
private static File[] |
EMPTY
. |
String |
name
. |
(package private) LinkedList<Resource> |
resources
. |
Constructor Summary |
|
Node()
|
private |
Node(String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
private static final File[] EMPTY
-
.
name
public final String name
-
.
dirs
File[] dirs
-
The lazy dires not yet processed.
children
HashMap<String,Node> children
-
.
resources
LinkedList<Resource> resources
-
.
Node
public Node()
Node
private Node(String name)
merge
void merge(ClassLoader loader)
throws IOException,
URISyntaxException
-
-
- Throws:
IOException
URISyntaxException
rewrite
String rewrite(String url)
-
Rewrite an URL by analysing the serie of trailing
!/
. The number of jar:
prefixes does not have to be equals to the number of separators.
-
-
- Parameters:
url
- the url to rewrite
- Returns:
- the rewritten URL
children
Iterable<Node> children()
throws IOException
-
-
- Throws:
IOException
mergeEntries
void mergeEntries(URL url)
throws IOException,
URISyntaxException
-
-
- Throws:
IOException
URISyntaxException
_mergeEntries
private void _mergeEntries(URL url)
throws IOException,
URISyntaxException
-
-
- Throws:
IOException
URISyntaxException
merge
private void merge(File f)
throws IOException
-
-
- Throws:
IOException
addEntry
private void addEntry(URL baseURL,
String entryName,
InputStreamFactory resolver)
throws IOException
-
-
- Throws:
IOException
addEntry
private void addEntry(URL baseURL,
int index,
String entryName,
long lastModified,
InputStreamFactory resolver)
throws IOException
-
-
- Throws:
IOException
iterator
public Iterator<Resource> iterator()
-
- Specified by:
iterator
in interface Iterable<Resource>
-
Copyright © 2015 eXo Platform SAS. All Rights Reserved.