|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.easybeans.deployable.archive.EZBDirectoryArchiveImpl
public class EZBDirectoryArchiveImpl
Creates wrapper around directory.
Field Summary | |
---|---|
private java.io.File |
directory
Internal resource used as archive. |
Constructor Summary | |
---|---|
protected |
EZBDirectoryArchiveImpl(java.io.File directory)
Creates new instance of an EZBArchive for a directory. |
Method Summary | |
---|---|
private void |
addFiles(java.io.File file,
java.util.List<java.net.URL> listResources)
Methods that loop on directories to find the children (files). |
boolean |
close()
Close the underlying Resource. |
private java.lang.String |
encode(java.lang.String resourceName)
Encode resource name to be used on Unix/Windows systems. |
boolean |
equals(java.lang.Object o)
Is that the given object is equals to our instance. |
java.lang.String |
getName()
|
java.net.URL |
getResource(java.lang.String resourceName)
|
java.util.Iterator<java.net.URL> |
getResources()
|
java.util.Iterator<java.net.URL> |
getResources(java.lang.String resourceName)
|
java.net.URL |
getURL()
|
int |
hashCode()
Gets hashcode for this object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.io.File directory
Constructor Detail |
---|
protected EZBDirectoryArchiveImpl(java.io.File directory)
directory
- the given directory.Method Detail |
---|
public java.lang.String getName()
getName
in interface EZBArchive
private java.lang.String encode(java.lang.String resourceName)
resourceName
- the name to encode.
public boolean close()
close
in interface EZBArchive
true
if the close was
succesful, false
otherwise.public java.net.URL getResource(java.lang.String resourceName) throws EZBArchiveException
getResource
in interface EZBArchive
resourceName
- The resource name to be looked up.
EZBArchiveException
- if method fails.public java.util.Iterator<java.net.URL> getResources() throws EZBArchiveException
getResources
in interface EZBArchive
EZBArchiveException
- if method fails.private void addFiles(java.io.File file, java.util.List<java.net.URL> listResources)
file
- the given directory/file.listResources
- the list on which to add new files.public java.util.Iterator<java.net.URL> getResources(java.lang.String resourceName) throws EZBArchiveException
getResources
in interface EZBArchive
resourceName
- The resource name to be looked up.
EZBArchiveException
- if method fails.public java.net.URL getURL() throws EZBArchiveException
getURL
in interface EZBArchive
EZBArchiveException
- if method fails.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to compare.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |