Package | Description |
---|---|
com.maverick.sftp |
The base implementation of the SFTP protocol enabling SFTP to be
operated over both SSH1 and SSH2 connections.
|
com.maverick.ssh |
This package contains a set of general interface contracts for SSH communication that
provide the core set of functionality available in both the SSH1 and SSH2 protocol specifications.
|
com.sshtools.scp |
This package contains the SSHTools SCP implementation converted to use the
J2SSH Maverick API's SCP engine.
|
com.sshtools.sftp |
This package contains the SSHTools SFTP client converted for use with the J2SSH
Maverick API.
|
Modifier and Type | Method and Description |
---|---|
boolean |
SftpFile.canRead()
Determine whether the user has read access to the file.
|
boolean |
SftpFile.canWrite()
Determine whether the user has write access to the file.
|
void |
SftpSubsystemChannel.changePermissions(SftpFile file,
int permissions)
Change the permissions of a file.
|
void |
SftpSubsystemChannel.changePermissions(String filename,
int permissions)
Change the permissions of a file.
|
void |
SftpSubsystemChannel.changePermissions(String filename,
String permissions)
Change the permissions of a file.
|
void |
SftpFile.close()
Close the file.
|
void |
SftpSubsystemChannel.closeFile(SftpFile file)
Close a file or directory.
|
void |
SftpSubsystemChannel.createLink(String targetpath,
String linkpath,
boolean symbolic)
Create a symbolic link.
|
void |
SftpSubsystemChannel.createSymbolicLink(String targetpath,
String linkpath)
Create a symbolic link.
|
void |
SftpFile.delete()
Delete this file/directory from the remote server.
|
String |
SftpSubsystemChannel.getAbsolutePath(SftpFile file)
Get the absolute path of a file.
|
String |
SftpSubsystemChannel.getAbsolutePath(String path)
Get the absolute path of a file.
|
SftpFileAttributes |
SftpFile.getAttributes()
Get the files attributes.
|
SftpFileAttributes |
SftpSubsystemChannel.getAttributes(SftpFile file)
Get the attributes of a file.
|
SftpFileAttributes |
SftpSubsystemChannel.getAttributes(String path)
Get the attributes of a file.
|
protected SftpFileAttributes |
SftpSubsystemChannel.getAttributes(String path,
int messageId,
String messageName) |
byte[] |
SftpSubsystemChannel.getCanonicalNewline()
Returns the canonical newline convention in use when reading/writing text
files.
|
String |
SftpSubsystemChannel.getDefaultDirectory()
Gets the users default directory.
|
SftpMessage |
SftpSubsystemChannel.getExtensionResponse(UnsignedInteger32 requestId) |
SftpFile |
SftpSubsystemChannel.getFile(String path)
Utility method to obtain an
SftpFile instance for a given path. |
byte[] |
SftpSubsystemChannel.getHandleResponse(SftpMessage bar,
UnsignedInteger32 requestId) |
byte[] |
SftpSubsystemChannel.getHandleResponse(UnsignedInteger32 requestId) |
SftpFileAttributes |
SftpSubsystemChannel.getLinkAttributes(String path)
Get the attributes of a file.
|
void |
SftpSubsystemChannel.getOKRequestStatus(UnsignedInteger32 requestId)
Verify that an OK status has been returned for a request id.
|
SftpFile |
SftpFile.getParent()
Get the parent of the current file.
|
SftpFile |
SftpSubsystemChannel.getSingleFileResponse(SftpMessage bar,
String messageName)
Get a single SftpFile object from a message returning SSH_FXP_NAME result.
|
String |
SftpSubsystemChannel.getSymbolicLinkTarget(String linkpath)
Get the target path of a symbolic link.
|
boolean |
SftpFileAttributes.isAppendOnly() |
boolean |
SftpFileAttributes.isArchive() |
boolean |
SftpFileAttributes.isAttributeBitSet(long attributeBit) |
boolean |
SftpFile.isBlock()
Determine whether the file is pointing to a block special file.
|
boolean |
SftpFileAttributes.isCaseInsensitive() |
boolean |
SftpFile.isCharacter()
Determine whether the file is pointing to a character mode device.
|
boolean |
SftpFileAttributes.isCompressed() |
boolean |
SftpFile.isDirectory()
Determine whether the file object is pointing to a directory.
|
boolean |
SftpFileAttributes.isEncrypted() |
boolean |
SftpFile.isFifo()
Determine whether the file is pointing to a pipe.
|
boolean |
SftpFile.isFile()
Determine whether the file object is pointing to a file.
|
boolean |
SftpFileAttributes.isHidden() |
boolean |
SftpFileAttributes.isImmutable() |
boolean |
SftpFile.isLink()
Determine whether the file object is a symbolic link.
|
boolean |
SftpFileAttributes.isReadOnly() |
boolean |
SftpFile.isSocket()
Determine whether the file is pointing to a socket.
|
boolean |
SftpFileAttributes.isSparse() |
boolean |
SftpFileAttributes.isSync() |
boolean |
SftpFileAttributes.isSystem() |
int |
SftpSubsystemChannel.listChildren(SftpFile file,
Vector<SftpFile> children)
List the children of a directory.
|
int |
SftpSubsystemChannel.listChildren(SftpFile file,
Vector<SftpFile> children,
boolean disableAttributeCheck) |
void |
SftpSubsystemChannel.lockFile(byte[] handle,
long offset,
long length,
int lockFlags) |
void |
SftpSubsystemChannel.makeDirectory(String path)
Make a directory.
|
void |
SftpSubsystemChannel.makeDirectory(String path,
SftpFileAttributes attrs)
Make a directory.
|
SftpFile |
SftpSubsystemChannel.openDirectory(String path)
Open a directory.
|
SftpFile |
SftpSubsystemChannel.openDirectory(String path,
boolean disableAttributeCheck)
Open a directory.
|
SftpFile |
SftpSubsystemChannel.openFile(String absolutePath,
int flags)
Open a file.
|
SftpFile |
SftpSubsystemChannel.openFile(String absolutePath,
int flags,
SftpFileAttributes attrs)
Open a file.
|
SftpFile |
SftpSubsystemChannel.openFileVersion5(String absolutePath,
int flags,
int accessFlags,
SftpFileAttributes attrs) |
void |
SftpSubsystemChannel.performOptimizedRead(byte[] handle,
long length,
int blocksize,
OutputStream out,
int outstandingRequests,
FileTransferProgress progress)
Performs an optimized read of a file through use of asynchronous
messages.
|
void |
SftpSubsystemChannel.performOptimizedRead(byte[] handle,
long length,
int blocksize,
OutputStream out,
int outstandingRequests,
FileTransferProgress progress,
long position)
Performs an optimized read of a file through use of asynchronous
messages.
|
void |
SftpSubsystemChannel.performOptimizedWrite(byte[] handle,
int blocksize,
int outstandingRequests,
InputStream in,
int buffersize,
FileTransferProgress progress)
Performs an optimized write of a file through asynchronous messaging and
through buffering the local file into memory.
|
void |
SftpSubsystemChannel.performOptimizedWrite(byte[] handle,
int blocksize,
int outstandingRequests,
InputStream in,
int buffersize,
FileTransferProgress progress,
long position)
Performs an optimized write of a file through asynchronous messaging and
through buffering the local file into memory.
|
void |
SftpSubsystemChannel.performSynchronousRead(byte[] handle,
int blocksize,
OutputStream out,
FileTransferProgress progress,
long position)
Perform a synchronous read of a file from the remote file system.
|
UnsignedInteger32 |
SftpSubsystemChannel.postReadRequest(byte[] handle,
long offset,
int len)
Post a read request to the server and return the request id; this is used
to optimize file downloads.
|
UnsignedInteger32 |
SftpSubsystemChannel.postWriteRequest(byte[] handle,
long position,
byte[] data,
int off,
int len)
Send a write request for an open file but do not wait for the response
from the server.
|
int |
SftpSubsystemChannel.readFile(byte[] handle,
UnsignedInteger64 offset,
byte[] output,
int off,
int len)
Read a block of data from an open file.
|
void |
SftpSubsystemChannel.recurseMakeDirectory(String path)
Recurse through a hierarchy of directories creating them as necessary.
|
void |
SftpSubsystemChannel.removeDirectory(String path)
Remove an empty directory.
|
void |
SftpSubsystemChannel.removeFile(String filename)
Remove a file.
|
void |
SftpSubsystemChannel.renameFile(String oldpath,
String newpath)
Rename an existing file.
|
void |
SftpSubsystemChannel.renameFile(String oldpath,
String newpath,
int flags) |
UnsignedInteger32 |
SftpSubsystemChannel.sendExtensionMessage(String request,
byte[] requestData)
Send an extension message and return the response.
|
void |
SftpFileAttributes.setAppendOnly(boolean value) |
void |
SftpFileAttributes.setArchive(boolean value) |
void |
SftpSubsystemChannel.setAttributes(SftpFile file,
SftpFileAttributes attrs)
Sets the attributes of a file.
|
void |
SftpSubsystemChannel.setAttributes(String path,
SftpFileAttributes attrs)
Sets the attributes of a file.
|
void |
SftpFileAttributes.setCaseSensitive(boolean value) |
void |
SftpFileAttributes.setCompressed(boolean value) |
void |
SftpFileAttributes.setEncrypted(boolean value) |
void |
SftpFileAttributes.setHidden(boolean value) |
void |
SftpFileAttributes.setImmutable(boolean value) |
void |
SftpFileAttributes.setReadOnly(boolean value) |
void |
SftpFileAttributes.setSparse(boolean value) |
void |
SftpFileAttributes.setSync(boolean value) |
void |
SftpFileAttributes.setSystem(boolean value) |
void |
SftpSubsystemChannel.unlockFile(byte[] handle,
long offset,
long length) |
void |
SftpSubsystemChannel.writeFile(byte[] handle,
UnsignedInteger64 offset,
byte[] data,
int off,
int len)
Write a block of data to an open file.
|
Constructor and Description |
---|
SftpFileInputStream(SftpFile file) |
SftpFileInputStream(SftpFile file,
long position)
Creates a new SftpFileInputStream object.
|
SftpFileOutputStream(SftpFile file)
Creates a new SftpFileOutputStream object.
|
Modifier and Type | Method and Description |
---|---|
static void |
SshReporter.main(String[] args) |
static void |
SshDiagnostics.main(String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
ScpClient.put(String localFile,
String remoteFile,
boolean recursive)
Uploads a local file onto the remote server.
|
Modifier and Type | Method and Description |
---|---|
void |
SftpClient.append(InputStream in,
String remote) |
void |
SftpClient.append(InputStream in,
String remote,
FileTransferProgress progress) |
void |
SftpClient.append(String local,
String remote) |
void |
SftpClient.append(String local,
String remote,
FileTransferProgress progress) |
void |
SftpClient.cd(String dir)
Changes the working directory on the remote server, or the user's default
directory if
null or any empty string is provided as the
directory path. |
void |
SftpClient.cd(String dir,
boolean disableAttributeChecks)
Changes the working directory on the remote server, or the user's default
directory if
null or any empty string is provided as the
directory path. |
void |
SftpClient.cdup()
Change the working directory to the parent directory
|
void |
SftpClient.chgrp(String gid,
String path)
Sets the group ID for the file or directory.
|
void |
SftpClient.chmod(int permissions,
String path)
Changes the access permissions or modes of the specified file or
directory.
|
void |
SftpClient.chown(String uid,
String path)
Sets the user ID to owner for the file or directory.
|
DirectoryOperation |
SftpClient.copyLocalDirectory(String localdir,
String remotedir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Deprecated.
Use putLocalDirectory instead.
|
void |
SftpClient.copyRemoteData(SftpFile sourceFile,
UnsignedInteger64 fromOffset,
UnsignedInteger64 length,
SftpFile destinationFile,
UnsignedInteger64 toOffset) |
DirectoryOperation |
SftpClient.copyRemoteDirectory(String remotedir,
String localdir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Deprecated.
Use getRemoteDirectory instead
|
void |
SftpClient.copyRemoteFile(String sourceFile,
String destinationFile,
boolean overwriteDestination) |
protected byte[] |
SftpClient.doCheckFileHandle(String filename,
long offset,
long length,
RemoteHash algorithm) |
protected byte[] |
SftpClient.doCheckHashHandle(byte[] handle,
long offset,
long length,
RemoteHash algorithm) |
static String |
SftpClient.formatLongname(SftpFile file)
Format a String with the details of the file.
|
SftpFileAttributes |
SftpClient.get(String path)
Download the remote file to the local computer
|
SftpFileAttributes |
SftpClient.get(String path,
boolean resume)
Download the remote file to the local computer
|
SftpFileAttributes |
SftpClient.get(String path,
FileTransferProgress progress)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String path,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local)
Download the remote file into an OutputStream.
|
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
FileTransferProgress progress)
Download the remote file writing it to the specified
OutputStream . |
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
FileTransferProgress progress,
long position)
Download the remote file writing it to the specified
OutputStream . |
SftpFileAttributes |
SftpClient.get(String remote,
OutputStream local,
long position)
Download the remote file into an OutputStream.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local)
Download the remote file into the local file.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
boolean resume)
Download the remote file into the local file.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
FileTransferProgress progress)
Download the remote file to the local computer.
|
SftpFileAttributes |
SftpClient.get(String remote,
String local,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
String |
SftpClient.getAbsolutePath(String path)
Get the absolute path for a file.
|
String |
SftpClient.getDefaultDirectory()
Get the default directory (or HOME directory)
|
int |
SftpClient.getEOL(byte[] nl) |
int |
SftpClient.getEOL(String line) |
SftpFile[] |
SftpClient.getFiles(String remote)
Download the remote files to the local computer
|
SftpFile[] |
SftpClient.getFiles(String remote,
boolean resume)
Download the remote files to the local computer
|
SftpFile[] |
SftpClient.getFiles(String remote,
FileTransferProgress progress)
Download the remote files to the local computer.
|
SftpFile[] |
SftpClient.getFiles(String remote,
FileTransferProgress progress,
boolean resume)
Download the remote files to the local computer.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local)
Download the remote files into the local file.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local,
boolean resume)
Download the remote files into the local file.
|
SftpFile[] |
SftpClient.getFiles(String remote,
String local,
FileTransferProgress progress,
boolean resume)
Download the remote file to the local computer.
|
String |
SftpClient.getHomeDirectory(String username) |
InputStream |
SftpClient.getInputStream(String remotefile)
Create an InputStream for reading a remote file.
|
InputStream |
SftpClient.getInputStream(String remotefile,
long position)
Create an InputStream for reading a remote file.
|
OutputStream |
SftpClient.getOutputStream(String remotefile)
Create an OutputStream for writing to a remote file.
|
DirectoryOperation |
SftpClient.getRemoteDirectory(String remotedir,
String localdir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Copy the contents of a remote directory to a local directory
|
int |
SftpClient.getRemoteEOL() |
byte[] |
SftpClient.getRemoteHash(byte[] handle)
Deprecated.
|
byte[] |
SftpClient.getRemoteHash(byte[] handle,
long offset,
long length,
byte[] quickCheck)
Deprecated.
|
byte[] |
SftpClient.getRemoteHash(byte[] handle,
long offset,
long length,
RemoteHash algorithm) |
byte[] |
SftpClient.getRemoteHash(byte[] handle,
RemoteHash algorithm) |
byte[] |
SftpClient.getRemoteHash(String remoteFile)
Deprecated.
|
byte[] |
SftpClient.getRemoteHash(String remoteFile,
long offset,
long length,
byte[] quickCheck)
Deprecated.
|
byte[] |
SftpClient.getRemoteHash(String path,
long offset,
long length,
RemoteHash algorithm) |
byte[] |
SftpClient.getRemoteHash(String path,
RemoteHash algorithm) |
String |
SftpClient.getRemoteNewline() |
String |
SftpClient.getTemporaryFolder() |
long |
DirectoryOperation.getTransferSize()
Get the total number of bytes that this operation will transfer
|
void |
SftpClient.hardlink(String src,
String dst) |
boolean |
SftpClient.isDirectoryOrLinkedDirectory(SftpFile file)
Determine whether the file object is pointing to a symbolic link that is
pointing to a directory.
|
void |
SftpClient.lcd(String path)
Changes the local working directory.
|
SftpFile[] |
SftpClient.ls()
Deprecated.
use ls(int maximumFiles) instead.
|
SftpFile[] |
SftpClient.ls(int maximumFiles)
List the contents of the current remote working directory.
|
SftpFile[] |
SftpClient.ls(String path)
Deprecated.
use ls(String path, int maximumFiles) instead.
|
SftpFile[] |
SftpClient.ls(String filter,
boolean regexFilter,
int maximumFiles) |
SftpFile[] |
SftpClient.ls(String path,
int maximumFiles)
List the contents remote directory.
|
SftpFile[] |
SftpClient.ls(String path,
String filter,
boolean regexFilter,
int maximumFiles) |
Iterator<SftpFile> |
SftpClient.lsIterator()
Return an iterator for the current working directory.
|
Iterator<SftpFile> |
SftpClient.lsIterator(String path)
Return an iterator for the path provided.
|
String |
SftpClient.makeTemporaryFolder() |
String[] |
RegularExpressionMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
returns each of the files that match the pattern fileNameRegExp
|
String[] |
NoRegExpMatching.matchFileNamesWithPattern(File[] files,
String fileNameRegExp)
opens and returns the requested filename string
|
SftpFile[] |
RegularExpressionMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
returns each of the SftpFiles that match the pattern fileNameRegExp
|
SftpFile[] |
Perl5RegExpMatching.matchFilesWithPattern(SftpFile[] files,
String pattern)
compiles pattern into a regular expression and pattern
matches on each file's name, and returns those that match.
|
SftpFile[] |
NoRegExpMatching.matchFilesWithPattern(SftpFile[] files,
String fileNameRegExp)
returns files
|
SftpFile[] |
GlobRegExpMatching.matchFilesWithPattern(SftpFile[] files,
String pattern)
compiles pattern into a regular expression and pattern
matches on each file's name, and returns those that match.
|
SftpFile[] |
SftpClient.matchRemoteFiles(String remote)
Called by getFileMatches() to do regular expression pattern matching on
the files in 'remote''s parent directory.
|
void |
SftpClient.mkdir(String dir)
Creates a new directory on the remote server.
|
void |
SftpClient.mkdirs(String dir)
Create a directory or set of directories.
|
SftpFile |
SftpClient.openFile(String fileName) |
void |
SftpClient.put(InputStream in,
String remote)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.put(InputStream in,
String remote,
FileTransferProgress progress)
Upload a file to the remote computer reading from the specified
InputStream . |
void |
SftpClient.put(InputStream in,
String remote,
FileTransferProgress progress,
long position) |
void |
SftpClient.put(InputStream in,
String remote,
long position)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.put(String local)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
boolean resume)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
FileTransferProgress progress)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
FileTransferProgress progress,
boolean resume)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
String remote)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
String remote,
boolean resume)
Upload a file to the remote computer
|
void |
SftpClient.put(String local,
String remote,
FileTransferProgress progress)
Upload a file to the remote computer.
|
void |
SftpClient.put(String local,
String remote,
FileTransferProgress progress,
boolean resume)
Upload a file to the remote computer.
|
void |
SftpClient.putFiles(String local)
Upload the contents of an InputStream to the remote computer.
|
void |
SftpClient.putFiles(String local,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
FileTransferProgress progress)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
FileTransferProgress progress,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote,
boolean resume)
Upload files to the remote computer
|
void |
SftpClient.putFiles(String local,
String remote,
FileTransferProgress progress)
Upload files to the remote computer.
|
void |
SftpClient.putFiles(String local,
String remote,
FileTransferProgress progress,
boolean resume)
make local copies of some of the variables, then call putfilematches,
which calls "put" on each file that matches the regexp local.
|
DirectoryOperation |
SftpClient.putLocalDirectory(String localdir,
String remotedir,
boolean recurse,
boolean sync,
boolean commit,
FileTransferProgress progress)
Copy the contents of a local directory into a remote directory.
|
void |
SftpClient.rename(String oldpath,
String newpath)
Rename a file on the remote computer.
|
void |
SftpClient.rename(String oldpath,
String newpath,
boolean posix)
Rename a file on the remote computer, optionally using posix semantics that allow files to be renamed
even if the destination path exists.
|
void |
SftpClient.rm(String path)
Remove a file or directory from the remote computer.
|
void |
SftpClient.rm(String path,
boolean force,
boolean recurse)
Remove a file or directory on the remote computer with options to force
deletion of existing files and recursion.
|
SftpFileAttributes |
SftpClient.stat(String path)
Returns the attributes of the file from the remote computer.
|
SftpFileAttributes |
SftpClient.statLink(String path)
Returns the attributes of the link from the remote computer.
|
StatVfs |
SftpClient.statVFS(String path) |
void |
SftpClient.symlink(String path,
String link)
Create a symbolic link on the remote computer.
|
boolean |
SftpClient.verifyFiles(String localFile,
String remoteFile)
Verify a local and remote file.
|
boolean |
SftpClient.verifyFiles(String localFile,
String remoteFile,
long offset,
long length)
Verify a local and remote file.
|
boolean |
SftpClient.verifyFiles(String localFile,
String remoteFile,
long offset,
long length,
RemoteHash algorithm) |
boolean |
SftpClient.verifyFiles(String localFile,
String remoteFile,
RemoteHash algorithm) |
Constructor and Description |
---|
SftpClient(int timeout,
SshClient ssh) |
SftpClient(int timeout,
SshSession session) |
SftpClient(SshClient ssh) |
SftpClient(SshClient ssh,
ChannelEventListener listener) |
SftpClient(SshClient ssh,
ChannelEventListener listener,
int timeout) |
SftpClient(SshClient ssh,
int version)
Constructs the SFTP client.
|
SftpClient(SshClient ssh,
int version,
ChannelEventListener listener)
Constructs the SFTP client with a given channel event listener.
|
SftpClient(SshClient ssh,
int version,
int timeout)
Constructs the SFTP client.
|
SftpClient(SshClient ssh,
int version,
int timeout,
ChannelEventListener listener)
Constructs the SFTP client with a given channel event listener.
|
SftpClient(SshSession session) |
SftpClient(SshSession session,
int version) |
SftpClient(SshSession session,
int version,
int timeout) |
Copyright © 2024. All rights reserved.