Class LazyResource
- java.lang.Object
-
- org.apache.ivy.plugins.repository.LazyResource
-
- All Implemented Interfaces:
Resource
- Direct Known Subclasses:
VsftpResource
public abstract class LazyResource extends java.lang.Object implements Resource
-
-
Constructor Summary
Constructors Constructor Description LazyResource(java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanexists()Determine if the resource is available.longgetContentLength()Get the resource sizelonggetLastModified()Get the date the resource was last modifiedjava.lang.StringgetName()Get the name of the resource.protected abstract voidinit()protected voidinit(Resource r)booleanisLocal()Is this resource local to this host, i.e. is it on the file system?protected voidsetContentLength(long contentLength)protected voidsetExists(boolean exists)protected voidsetLastModified(long lastModified)protected voidsetLocal(boolean local)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.ivy.plugins.repository.Resource
clone, openStream
-
-
-
-
Method Detail
-
init
protected abstract void init()
-
exists
public boolean exists()
Description copied from interface:ResourceDetermine if the resource is available. Note that this method only checks for availability, not for actual existence.
-
getContentLength
public long getContentLength()
Description copied from interface:ResourceGet the resource size- Specified by:
getContentLengthin interfaceResource- Returns:
- a
longvalue representing the size of the resource in bytes.
-
getLastModified
public long getLastModified()
Description copied from interface:ResourceGet the date the resource was last modified- Specified by:
getLastModifiedin interfaceResource- Returns:
- A
longvalue representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or0Lif the file does not exist or if an I/O error occurs.
-
getName
public java.lang.String getName()
Description copied from interface:ResourceGet the name of the resource.
-
isLocal
public boolean isLocal()
Description copied from interface:ResourceIs this resource local to this host, i.e. is it on the file system?
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setContentLength
protected void setContentLength(long contentLength)
-
setExists
protected void setExists(boolean exists)
-
setLastModified
protected void setLastModified(long lastModified)
-
setLocal
protected void setLocal(boolean local)
-
init
protected void init(Resource r)
-
-