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

public Class CheckFileNameExtensionImpl

extends AbstractCheckFileExtension
implements CheckFileNameExtension
Class Inheritance
All Implemented Interfaces
org.apache.sshd.sftp.client.extensions.CheckFileNameExtension, 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, org.apache.sshd.sftp.client.extensions.CheckFileNameExtension, org.apache.sshd.sftp.common.SftpConstants

Implements "check-file-name" 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[]>>
checkFileName(String
Remote file name/path
name
,
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.CheckFileNameExtension.checkFileName.

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

Constructor Detail

CheckFileNameExtensionImplback to summary
public CheckFileNameExtensionImpl(SftpClient client, RawSftpClient raw, Collection<String> extras)

Method Detail

checkFileNameback to summary
public AbstractMap.SimpleImmutableEntry<String, Collection<byte[]>> checkFileName(String name, Collection<String> algorithms, long startOffset, long length, int blockSize) throws IOException

Implements org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

Parameters
name:String

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

Remote file name/path

algorithms:Collection<String>

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

Hash algorithms in preferred order

startOffset:long

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

Start offset of the hash

length:long

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

Length of data to hash - if zero then till EOF

blockSize:int

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

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.CheckFileNameExtension.checkFileName.

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

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.sshd.sftp.client.extensions.CheckFileNameExtension.checkFileName.

If failed to execute the command