|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.types.DataType org.apache.tools.ant.types.Resource org.apache.tools.ant.types.resources.ArchiveResource
public abstract class ArchiveResource
A Resource representation of an entry inside an archive.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.types.Resource |
---|
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE |
Fields inherited from class org.apache.tools.ant.types.DataType |
---|
checked, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
ArchiveResource()
Default constructor. |
|
ArchiveResource(java.io.File a)
Construct a ArchiveResource representing the specified entry in the specified archive. |
|
ArchiveResource(java.io.File a,
boolean withEntry)
Construct a ArchiveResource representing the specified entry in the specified archive. |
|
ArchiveResource(Resource a,
boolean withEntry)
Construct a ArchiveResource representing the specified entry in the specified archive. |
Method Summary | |
---|---|
void |
addConfigured(ResourceCollection a)
Sets the archive that holds this as a single element Resource collection. |
int |
compareTo(java.lang.Object another)
Compare this ArchiveResource to another Resource. |
boolean |
equals(java.lang.Object another)
Compare another Object to this ArchiveResource for equality. |
protected abstract void |
fetchEntry()
fetches information from the named entry inside the archive. |
Resource |
getArchive()
Get the archive that holds this Resource. |
long |
getLastModified()
Get the last modified date of this Resource. |
int |
getMode()
Get the file or dir mode for this Resource. |
long |
getSize()
Get the size of this Resource. |
int |
hashCode()
Get the hash code for this Resource. |
boolean |
isDirectory()
Learn whether this Resource represents a directory. |
boolean |
isExists()
Find out whether this Resource represents an existing Resource. |
void |
setArchive(java.io.File a)
Set the archive that holds this Resource. |
void |
setMode(int mode)
Sets the file or dir mode for this resource. |
void |
setRefid(Reference r)
Overrides the super version. |
java.lang.String |
toString()
Format this Resource as a String. |
Methods inherited from class org.apache.tools.ant.types.Resource |
---|
clone, getInputStream, getMagicNumber, getName, getOutputStream, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString |
Methods inherited from class org.apache.tools.ant.types.DataType |
---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArchiveResource()
public ArchiveResource(java.io.File a)
a
- the archive as File.public ArchiveResource(java.io.File a, boolean withEntry)
a
- the archive as File.withEntry
- if the entry has been specified.public ArchiveResource(Resource a, boolean withEntry)
a
- the archive as Resource.withEntry
- if the entry has been specified.Method Detail |
---|
public void setArchive(java.io.File a)
a
- the archive as a File.public void setMode(int mode)
mode
- integer representation of Unix permission mask.public void addConfigured(ResourceCollection a)
a
- the archive as a single element Resource collection.public Resource getArchive()
public long getLastModified()
getLastModified
in class Resource
public long getSize()
getSize
in class Resource
public boolean isDirectory()
isDirectory
in class Resource
public boolean isExists()
isExists
in class Resource
public int getMode()
public void setRefid(Reference r)
setRefid
in class Resource
r
- the Reference to set.public int compareTo(java.lang.Object another)
compareTo
in interface java.lang.Comparable
compareTo
in class Resource
another
- the other Resource against which to compare.
public boolean equals(java.lang.Object another)
equals
in class Resource
another
- the other Object to compare.
public int hashCode()
hashCode
in class Resource
public java.lang.String toString()
toString
in class Resource
protected abstract void fetchEntry()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |