Class MD5HandleExtensionImpl
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractSftpClientExtension
-
- org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractMD5HashExtension
-
- org.apache.sshd.client.subsystem.sftp.extensions.helpers.MD5HandleExtensionImpl
-
- All Implemented Interfaces:
MD5HandleExtension
,SftpClientExtension
,RawSftpClient
,NamedResource
,OptionalFeature
public class MD5HandleExtensionImpl extends AbstractMD5HashExtension implements MD5HandleExtension
Implements "md5-hash-handle" extension- Author:
- Apache MINA SSHD Project
- See Also:
- DRAFT 09 - section 9.1.1
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
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
-
-
Constructor Summary
Constructors Constructor Description MD5HandleExtensionImpl(SftpClient client, RawSftpClient raw, Collection<String> extra)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getHash(SftpClient.Handle handle, long offset, long length, byte[] quickHash)
-
Methods inherited from class org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractMD5HashExtension
doGetHash
-
Methods inherited from class org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractSftpClientExtension
checkExtendedReplyBuffer, checkStatus, getClient, getCommandBuffer, getCommandBuffer, getCommandBuffer, getName, isSupported, putTarget, receive, send, sendAndCheckExtendedCommandStatus, sendExtendedCommand, throwStatusException, validateIncomingResponse
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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.client.subsystem.sftp.extensions.SftpClientExtension
getClient
-
-
-
-
Constructor Detail
-
MD5HandleExtensionImpl
public MD5HandleExtensionImpl(SftpClient client, RawSftpClient raw, Collection<String> extra)
-
-
Method Detail
-
getHash
public byte[] getHash(SftpClient.Handle handle, long offset, long length, byte[] quickHash) throws IOException
- Specified by:
getHash
in interfaceMD5HandleExtension
- Parameters:
handle
- The (remote) fileHandle
offset
- The offset to start calculating the hashlength
- The number of data bytes to calculate the hash on - if greater than available, then up to whatever is availablequickHash
- A quick-hash of the 1st 2048 bytes - ignored ifnull
/empty- Returns:
- The hash value if the quick hash matches (or
null
/empty), ornull
/empty if the quick hash is provided and it does not match - Throws:
IOException
- If failed to calculate the hash
-
-