Interface CheckFileHandleExtension
- All Superinterfaces:
NamedResource,OptionalFeature,SftpClientExtension,SftpClientHolder
- All Known Implementing Classes:
CheckFileHandleExtensionImpl
- See Also:
-
Field Summary
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTORFields inherited from interface org.apache.sshd.common.OptionalFeature
FALSE, TRUE -
Method Summary
Modifier and TypeMethodDescriptionMap.Entry<String, Collection<byte[]>> checkFileHandle(SftpClient.Handle handle, Collection<String> algorithms, long startOffset, long length, int blockSize) Methods inherited from interface org.apache.sshd.common.NamedResource
getNameMethods inherited from interface org.apache.sshd.common.OptionalFeature
isSupportedMethods inherited from interface org.apache.sshd.sftp.client.SftpClientHolder
getClient
-
Method Details
-
checkFileHandle
Map.Entry<String,Collection<byte[]>> checkFileHandle(SftpClient.Handle handle, Collection<String> algorithms, long startOffset, long length, int blockSize) throws IOException - Parameters:
handle- Remote fileSftpClient.Handle- must be a file and opened for readalgorithms- Hash algorithms in preferred orderstartOffset- Start offset of the hashlength- Length of data to hash - if zero then till EOFblockSize- Input block size to calculate individual hashes - if zero the one hash of all the data- Returns:
- An immutable
Map.Entrywhere key=hash algorithm name, value=the calculated hashes. - Throws:
IOException- If failed to execute the command
-