Class SshResource
- java.lang.Object
-
- org.apache.ivy.plugins.repository.ssh.SshResource
-
-
Constructor Summary
Constructors Constructor Description SshResource()SshResource(SshRepository repository, java.lang.String uri)SshResource(SshRepository repository, java.lang.String uri, boolean bExists, long len, long lastModified)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resourceclone(java.lang.String cloneName)Clones this resource with a new resource with a different namebooleanexists()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.booleanisLocal()Is this resource local to this host, i.e. is it on the file system?java.io.InputStreamopenStream()Opens a stream on this resourcejava.lang.StringtoString()
-
-
-
Constructor Detail
-
SshResource
public SshResource()
-
SshResource
public SshResource(SshRepository repository, java.lang.String uri)
-
SshResource
public SshResource(SshRepository repository, java.lang.String uri, boolean bExists, long len, long lastModified)
-
-
Method Detail
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isLocal
public boolean isLocal()
Description copied from interface:ResourceIs this resource local to this host, i.e. is it on the file system?
-
clone
public Resource clone(java.lang.String cloneName)
Description copied from interface:ResourceClones this resource with a new resource with a different name
-
openStream
public java.io.InputStream openStream() throws java.io.IOExceptionDescription copied from interface:ResourceOpens a stream on this resource- Specified by:
openStreamin interfaceResource- Returns:
- the opened input stream
- Throws:
java.io.IOException- if something goes wrong
-
-