Top Methods
org.apache.sshd.sftp.client.extensions

public Interface MD5HandleExtension

extends SftpClientExtension
Known Direct Implementers
org.apache.sshd.sftp.client.extensions.helpers.MD5HandleExtensionImpl
Imports
java.io.IOException, org.apache.sshd.sftp.client.SftpClient

Author
Apache MINA SSHD Project
See Also
DRAFT 09 - section 9.1.1

Method Summary

Modifier and TypeMethod and Description
public byte[]

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
getHash
(SftpClient.Handle
The (remote) file Handle
handle
,
long
The offset to start calculating the hash
offset
,
long
The number of data bytes to calculate the hash on - if greater than available, then up to whatever is available
length
,
byte[]
A quick-hash of the 1st 2048 bytes - ignored if null/empty
quickHash
)

Method Detail

getHashback to summary
public byte[] getHash(SftpClient.Handle handle, long offset, long length, byte[] quickHash) throws IOException
Parameters
handle:SftpClient.Handle

The (remote) file Handle

offset:long

The offset to start calculating the hash

length:long

The number of data bytes to calculate the hash on - if greater than available, then up to whatever is available

quickHash:byte[]

A quick-hash of the 1st 2048 bytes - ignored if null/empty

Returns:byte[]

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

Exceptions
IOException:
If failed to calculate the hash