org.apache.tools.ant.types.resources
public abstract class ArchiveResource extends Resource
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE
description, location, project
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, getInputStream, getMagicNumber, getName, getOutputStream, isFilesystemOnly, iterator, setDirectory, setExists, setLastModified, setName, setSize, size, toLongString
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
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.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()
public boolean isDirectory()
isDirectory
in class Resource
public boolean isExists()
public int getMode()
public void setRefid(Reference r)
public int compareTo(java.lang.Object another)
public boolean equals(java.lang.Object another)
public int hashCode()
public java.lang.String toString()
protected abstract void fetchEntry()