org.crsh.vfs.spi.url
Class Node

java.lang.Object
  extended by org.crsh.vfs.spi.url.Node
All Implemented Interfaces:
Iterable<Resource>

public class Node
extends Object
implements Iterable<Resource>

Author:
Julien Viet

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)
           
 
Method Summary
private  void _mergeEntries(URL url)
           
private  void addEntry(URL baseURL, int index, String entryName, long lastModified, InputStreamFactory resolver)
           
private  void addEntry(URL baseURL, String entryName, InputStreamFactory resolver)
           
(package private)  Iterable<Node> children()
           
 Iterator<Resource> iterator()
           
(package private)  void merge(ClassLoader loader)
           
private  void merge(File f)
           
(package private)  void mergeEntries(URL url)
           
(package private)  String rewrite(String url)
          Rewrite an URL by analysing the serie of trailing !/.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
.

Constructor Detail

Node

public Node()

Node

private Node(String name)
Method Detail

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.