Top Description Constructors Methods
org.apache.sshd.sftp.client.extensions.helpers

public Class CheckFileHandleExtensionImpl

extends AbstractCheckFileExtension
implements CheckFileHandleExtension
Class Inheritance
All Implemented Interfaces
org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension, org.apache.sshd.sftp.client.extensions.SftpClientExtension, org.apache.sshd.sftp.client.SftpClientHolder, org.apache.sshd.common.OptionalFeature, org.apache.sshd.common.NamedResource
Imports
java.io.IOException, java.util.AbstractMap.SimpleImmutableEntry, .Collection, org.apache.sshd.sftp.client.RawSftpClient, .SftpClient, .SftpClient.Handle, org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension, org.apache.sshd.sftp.common.SftpConstants

Implements "check-file-handle" extension
Author
Apache MINA SSHD Project
See Also
DRAFT 09 - section 9.1.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public AbstractMap.SimpleImmutableEntry<String, Collection<byte[]>>
checkFileHandle(SftpClient.Handle
Remote file Handle - must be a file and opened for read
handle
,
Collection<String>
Hash algorithms in preferred order
algorithms
,
long
Start offset of the hash
startOffset
,
long
Length of data to hash - if zero then till EOF
length
,
int
Input block size to calculate individual hashes - if zero the one hash of all the data
blockSize
)

Implements org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Inherited from org.apache.sshd.sftp.client.extensions.helpers.AbstractCheckFileExtension:
doGetHash

Constructor Detail

CheckFileHandleExtensionImplback to summary
public CheckFileHandleExtensionImpl(SftpClient client, RawSftpClient raw, Collection<String> extras)

Method Detail

checkFileHandleback to summary
public AbstractMap.SimpleImmutableEntry<String, Collection<byte[]>> checkFileHandle(SftpClient.Handle handle, Collection<String> algorithms, long startOffset, long length, int blockSize) throws IOException

Implements org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Parameters
handle:SftpClient.Handle

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Remote file Handle - must be a file and opened for read

algorithms:Collection<String>

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Hash algorithms in preferred order

startOffset:long

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Start offset of the hash

length:long

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Length of data to hash - if zero then till EOF

blockSize:int

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

Input block size to calculate individual hashes - if zero the one hash of all the data

Returns:AbstractMap.SimpleImmutableEntry<String, Collection<byte[]>>

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

An immutable java.util.Map.Entry where key=hash algorithm name, value=the calculated hashes.

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.sftp.client.extensions.CheckFileHandleExtension.checkFileHandle.

If failed to execute the command