|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpatterntesting.runtime.util.ArchivEntry
public class ArchivEntry
Unfortunately we can't extends URI because this is a final class.
So now it is more or less implemented as URI wrapper and is intended for
the use with zip and jar files to describe an entry inside an archive.
Historically some parts of this class were developed for a log browser
for Log4J. The facility to read (compressed) tar files (using
org.apache.commons.compress.tar.*) were removed because we use it here only
for zip and jar files.
| Constructor Summary | |
|---|---|
protected |
ArchivEntry(File file)
Instantiates a new archiv entry. |
|
ArchivEntry(String s)
Instantiates a new archiv entry. |
|
ArchivEntry(String scheme,
File archive,
String entry)
Instantiates a new archiv entry. |
|
ArchivEntry(URI uri)
Instantiates a new archiv entry. |
|
ArchivEntry(URL url)
Instantiates a new archiv entry. |
| Method Summary | |
|---|---|
boolean |
equals(ArchivEntry other)
If two entries have a different size or not the same byte code they are considered as not equal. |
boolean |
equals(Object other)
Equals. |
byte[] |
getBytes()
Gets the bytes. |
String |
getEntry()
Gets the entry. |
File |
getFile()
Gets the file. |
long |
getSize()
Gets the size. |
ZipEntry |
getZipEntry()
Gets the zip entry. |
ZipFile |
getZipFile()
Gets the zip file. |
int |
hashCode()
Hash code. |
boolean |
isFile()
Checks if is file. |
String |
toString()
To string. |
URI |
toURI()
To uri. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ArchivEntry(File file)
file - the filepublic ArchivEntry(String s)
s - the spublic ArchivEntry(URI uri)
uri - the uripublic ArchivEntry(URL url)
url - the url
public ArchivEntry(String scheme,
File archive,
String entry)
throws URISyntaxException
scheme - the schemearchive - the archiveentry - the entry
URISyntaxException - the URI syntax exception| Method Detail |
|---|
public URI toURI()
public boolean isFile()
public File getFile()
public ZipFile getZipFile()
throws IOException
IOException - Signals that an I/O exception has occurred.public String getEntry()
public ZipEntry getZipEntry()
public long getSize()
throws IOException
IOException - Signals that an I/O exception has occurred.
public byte[] getBytes()
throws IOException
IOException - Signals that an I/O exception has occurred.public boolean equals(Object other)
equals in class Objectother - the other
Object.equals(java.lang.Object)public boolean equals(ArchivEntry other)
other - the other
public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||