Class SshResource

java.lang.Object
org.apache.ivy.plugins.repository.ssh.SshResource
All Implemented Interfaces:
Resource

public class SshResource extends Object implements Resource
Resource for SSH Ivy Repository
  • Constructor Details

    • SshResource

      public SshResource()
    • SshResource

      public SshResource(SshRepository repository, String uri)
    • SshResource

      public SshResource(SshRepository repository, String uri, boolean bExists, long len, long lastModified)
  • Method Details

    • exists

      public boolean exists()
      Description copied from interface: Resource
      Determine if the resource is available. Note that this method only checks for availability, not for actual existence.
      Specified by:
      exists in interface Resource
      Returns:
      boolean value indicating if the resource is available.
    • getContentLength

      public long getContentLength()
      Description copied from interface: Resource
      Get the resource size
      Specified by:
      getContentLength in interface Resource
      Returns:
      a long value representing the size of the resource in bytes.
    • getLastModified

      public long getLastModified()
      Description copied from interface: Resource
      Get the date the resource was last modified
      Specified by:
      getLastModified in interface Resource
      Returns:
      A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970), or 0L if the file does not exist or if an I/O error occurs.
    • getName

      public String getName()
      Description copied from interface: Resource
      Get the name of the resource.
      Specified by:
      getName in interface Resource
      Returns:
      the repository's assigned resource name/identifier.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isLocal

      public boolean isLocal()
      Description copied from interface: Resource
      Is this resource local to this host, i.e. is it on the file system?
      Specified by:
      isLocal in interface Resource
      Returns:
      boolean value indicating if the resource is local.
    • clone

      public Resource clone(String cloneName)
      Description copied from interface: Resource
      Clones this resource with a new resource with a different name
      Specified by:
      clone in interface Resource
      Parameters:
      cloneName - the name of the clone
      Returns:
      the cloned resource
    • openStream

      public InputStream openStream() throws IOException
      Description copied from interface: Resource
      Opens a stream on this resource
      Specified by:
      openStream in interface Resource
      Returns:
      the opened input stream
      Throws:
      IOException - if something goes wrong