| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static class | |
| public abstract static class | |
| public static enum | |
| public static class | |
| public static class | |
| public static enum |
| Modifier and Type | Field and Description |
|---|---|
| public static final Set | DEFAULT_CHANNEL_MODES
Default modes for opening a channel if no specific modes specified |
| public static final SftpClient. | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The effective "normalized" remote pathThe requested path - may be relative, and/or contain dots - e.g., ".",
"..", "./foo", "../bar" path)The effective "normalized" remote path |
| public void | close(SftpClient.
The handleHandle to closeClose the handle obtained from one of the |
| public default < The generic extension type E extends SftpClientExtension> E | Returns: The extension instance - Note: it is up to the caller to invokeSftpClientExtension#isSupported() - null if this extension type is not
implemented by the clientThe extension type extensionType)
|
| public default SftpClientExtension | Returns: The extension instance - Note: it is up to the caller to invokeSftpClientExtension#isSupported() - null if this extension type is not
implemented by the clientThe extension name extensionName)
|
| public SftpClientExtension | Returns: The extension instance - Note: it is up to the caller to invokeSftpClientExtension#isSupported() - null if this extension type is not
implemented by the clientThe factory)SftpClientExtensionFactory instance to use - ignored if null
|
| public default String | |
| public Charset | |
| public NavigableMap | Returns: An (unmodifiable)NavigableMap of the reported server extensions. where key=extension name (case
insensitive)
|
| public int | |
| public boolean | |
| public void | |
| public Iterable | Returns: AnIterable that can be used to iterate over all the directory entries (like
readDir(String))Note the iterable instance is not re-usable - i.e., files can be iterated only once A directory handleHandle
|
| public void | |
| public SftpClient. | Returns: The associatedAttributesThe remote path path)Retrieve remote path meta-data - do not follow symbolic links |
| public void | |
| public default SftpClient. | |
| public default SftpClient. | Returns: The file'sCloseableHandleThe remote path path, SftpClient.The desired mode - if none specified then optionsOpenMode#Read is assumedOpens a remote file with the specified mode(s) |
| public SftpClient. | Returns: The file'sCloseableHandleThe remote path path, Collection<SftpClient.The desired mode - if none specified then optionsOpenMode#Read is assumedOpens a remote file with the specified mode(s) |
| public SftpClient. | |
| public default FileChannel | |
| public FileChannel | Returns: The openFileChannel - Note: do not close this owner client instance until the
channel is no longer needed since it uses the client for providing the channel's
functionality.The remote path path, Collection<SftpClient.The access mode(s) - if modesnull/empty then the DEFAULT_CHANNEL_MODES are usedOpens an |
| public default FileChannel | |
| public default FileChannel | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | |
| public default void | put(Path
Path of the local file to uploadSFTP packet size; i.e., amount of data to send in a single SFTP request. Most servers have a
limit of 256kB. If zero, a default buffer size is chosen depending on the peer's channel
packet size; so typically about 32kB. bufferSize, String The remote file path path, Collection<SftpClient.Uploads a local file to a remote file. |
| public void | put(InputStream
InputStream to read fromSFTP packet size; i.e., amount of data to send in a single SFTP request. Most servers have a
limit of 256kB. If zero, a default buffer size is chosen depending on the peer's channel
packet size; so typically about 32kB. bufferSize, String The remote file path path, Collection<SftpClient.Write data from an |
| public default int | Returns: Number of read bytes --1 if EOF reachedThe file handle,Handle to read fromThe file offset to read from fileOffset, byte[] The destination buffer dst)Reads data from the open (file) handle |
| public default int | Returns: Number of read bytes --1 if EOF reachedThe file handle,Handle to read fromThe file offset to read from fileOffset, byte[] The destination buffer dst, AtomicReference<Boolean> If not eofSignalled)null then upon return holds a value indicating whether EOF was reached due to
the read. If null indicator value then this indication is not availableReads data from the open (file) handle |
| public default int | |
| public int | Returns: Number of read bytes --1 if EOF reachedThe file handle,Handle to read fromThe file offset to read from fileOffset, byte[] The destination buffer dst, int Offset in destination buffer to place the read data dstOffset, int Available destination buffer size to read len, AtomicReference<Boolean> If not eofSignalled)null then upon return holds a value indicating whether EOF was reached due to
the read. If null indicator value then this indication is not availableReads data from the open (file) handle |
| public default InputStream | |
| public default InputStream | |
| public default InputStream | |
| public default InputStream | |
| public default InputStream | |
| public InputStream | Returns: AnInputStream for reading the remote file dataThe remote file path path, int The internal read buffer size bufferSize, Collection<SftpClient.The remote file modeOpenModesRead a remote file's data via an input stream |
| public default List | Returns: AList of entries - null to indicate no more entries Note: the list
may be incomplete since the client and server have some internal imposed limit on the
number of entries they can process. Therefore several calls to this method may be required
(until null). In order to iterate over all the entries use readDir(String)Directory handleHandle to read from
|
| public List | readDir(SftpClient.
Directory handle,Handle to read fromAn indicator that can be used to get information whether end of list has been reached -
ignored if eolIndicator)null. Upon return, set value indicates whether all entries have been
exhausted - a null value means that this information cannot be provided and another
call to readDir is necessary in order to verify that no more entries are pending
|
| public Iterable | Returns: AnIterable that can be used to iterate over all the directory entries (unlike
readDir(Handle))The remote directory path path)
|
| public default Collection | Returns: ACollection of all the entries in the remote directoryRemote directory path path)Reads all entries available for a directory |
| public String | |
| public void | |
| public default void | |
| public default void | |
| public void | |
| public void | |
| public void | |
| public void | setStat(String
The remote path path, SftpClient.The attributesAttributes to updateUpdate remote node meta-data |
| public void | setStat(SftpClient.
The handle,Handle obtained via one of the open callsThe attributesAttributes to updateUpdate remote node meta-data |
| public default SftpClient | Returns: The wrapper instanceCreates an |
| public SftpClient. | Returns: The associatedAttributesThe remote path path)Retrieve remote path meta-data - follow symbolic links if encountered |
| public SftpClient. | Returns: The associatedAttributesThe handleHandle obtained via one of the open callsRetrieve file/directory handle meta-data |
| public default void | |
| public void | |
| public default void | |
| public void | write(SftpClient.
The file handle,HandleZero-based offset to write in file fileOffset, byte[] Data buffer src, int Offset of valid data in buffer srcOffset, int Number of bytes to write len)Write data to (open) file handle |
| public default OutputStream | |
| public default OutputStream | |
| public default OutputStream | |
| public default OutputStream | |
| public default OutputStream | |
| public OutputStream | Returns: AnOutputStream for writing the dataThe remote file path path, int The internal write buffer size bufferSize, Collection<SftpClient.The remote file modeOpenModesWrite to a remote file via an output stream |