Interface MD5HandleExtension

All Superinterfaces:
org.apache.sshd.common.NamedResource, org.apache.sshd.common.OptionalFeature, SftpClientExtension, SftpClientHolder
All Known Implementing Classes:
MD5HandleExtensionImpl

public interface MD5HandleExtension extends SftpClientExtension
Author:
Apache MINA SSHD Project
See Also:
  • Field Summary

    Fields inherited from interface org.apache.sshd.common.NamedResource

    BY_NAME_COMPARATOR, NAME_EXTRACTOR

    Fields inherited from interface org.apache.sshd.common.OptionalFeature

    FALSE, TRUE
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    getHash(SftpClient.Handle handle, long offset, long length, byte[] quickHash)
     

    Methods inherited from interface org.apache.sshd.common.NamedResource

    getName

    Methods inherited from interface org.apache.sshd.common.OptionalFeature

    isSupported

    Methods inherited from interface org.apache.sshd.sftp.client.SftpClientHolder

    getClient
  • Method Details

    • getHash

      byte[] getHash(SftpClient.Handle handle, long offset, long length, byte[] quickHash) throws IOException
      Parameters:
      handle - The (remote) file Handle
      offset - The offset to start calculating the hash
      length - The number of data bytes to calculate the hash on - if greater than available, then up to whatever is available
      quickHash - A quick-hash of the 1st 2048 bytes - ignored if null/empty
      Returns:
      The hash value if the quick hash matches (or null/empty), or null/empty if the quick hash is provided and it does not match
      Throws:
      IOException - If failed to calculate the hash