| Modifier and Type | Field and Description |
|---|---|
| protected final SftpErrorDataHandler | |
| private final SftpClient. | |
| public static final int | |
| private final AtomicReference | |
| public static final Property | SFTP_CLIENT_CMD_TIMEOUT
Property that can be used on the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public String | canonicalPath(String
The requested path - may be relative, and/or contain dots - e.g., ".",
"..", "./foo", "../bar" path)Implements org. The effective "normalized" remote path |
| protected SftpClient. | Returns: The decoded responseAttributesCommand to be sent cmd, Buffer Request request)Buffer
|
| protected SftpClient. | |
| protected void | checkCommandStatus(int
The command to send cmd, Buffer The request request)BufferSends the specified command, waits for the response and then invokes |
| protected Buffer | Returns: aBuffer containing the data received (may be empty), or null if the
response was an SSH_FXP_EOF statusdescribing the SSH_FXP_READ request ack, SftpResponse SFTP response received response, AtomicReference<Boolean> if non- eofSignalled)null, set to true if an EOF was receivedProcesses a response to an SSH_FXP_READ request. |
| protected List | |
| protected byte[] | Returns: The received handle identifierCommand to be sent cmd, Buffer The request)Buffer containing the request
|
| protected byte[] | |
| protected String | Returns: The retrieved nameCommand to be sent cmd, Buffer The request request)Buffer
|
| protected String | |
| protected void | checkResponseStatus(SftpResponse
The received response)SftpResponseChecks if the incoming response is an |
| protected void | checkResponseStatus(int
The sent command opcode cmd, int The request id id, SftpStatus The status)SftpStatus
|
| public void | close(SftpClient.
The handleHandle to closeImplements org. Close the handle obtained from one of the |
| public void | errorData(byte[]
The buffer of the incoming data buf, int Offset in buffer to read the data start, int Available data in buffer len)Implements org. Receive binary data from server error stream |
| public Channel | |
| public <E extends SftpClientExtension> E | getExtension(Class<? extends E>
The extension type extensionType)Overrides default org.
|
| public SftpClientExtension | getExtension(SftpClientExtensionFactory
The factory)SftpClientExtensionFactory instance to use - ignored if nullImplements org.
|
| protected Map | |
| protected Map | |
| protected int | |
| protected String | Returns: The decoded referenced nameThe command that was sent whose response contains the name to be decoded cmd, Buffer The buf, int Buffer containing the encoded nameThe zero-based order of the requested names for the command - e.g.,
nameIndex)
|
| protected int | |
| protected SftpClient. | |
| protected byte[] | |
| protected IOException | Returns: The exception to throw - ifnull then implementor assumed to handle the exception
internal. Otherwise, the exception is re-thrownThe expected packet type expected, SftpResponse The actual response)SftpResponse received
|
| protected int | |
| protected List | |
| protected String | |
| public void | link(String
The link location linkPath, String The referenced target by the link targetPath, boolean If symbolic)true then make this a symbolic link, otherwise a hard oneImplements org. Create a link |
| public Iterable | listDir(SftpClient.
A directory handleHandleImplements org.
|
| public void | lock(SftpClient.
Implements org.
|
| public SftpClient. | lstat(String
The remote path path)Implements org. Retrieve remote path meta-data - do not follow symbolic links |
| public void | mkdir(String
Remote directory path path)Implements org. Create remote directory |
| public SftpClient. | open(String
The remote path path, Collection<SftpClient.The desired mode - if none specified then optionsOpenMode#Read is assumedImplements org. Opens a remote file with the specified mode(s) |
| public SftpClient. | openDir(String
Remote directory path path)Implements org. Obtain a handle for a directory |
| public FileChannel | openRemoteFileChannel(String
The remote path path, Collection<SftpClient.The access mode(s) - if modesnull/empty then the DEFAULT_CHANNEL_MODES are usedImplements org. Opens an |
| 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.Implements org. Write data from an |
| protected < Type of B extends Buffer> BBuffer being updated | Returns: The updated bufferThe command for which this name is being added cmd, B The buffer instance to update buf, String The name to place in the buffer name, int The zero-based order of the name for the specific command if more than one name required -
e.g., rename, link/symbolic link nameIndex)
|
| public int | read(SftpClient.
The 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 availableImplements org. Reads data from the open (file) handle |
| public InputStream | read(String
The remote file path path, int The internal read buffer size bufferSize, Collection<SftpClient.The remote file modeOpenModesImplements org. Read a remote file's data via an input stream |
| protected SftpClient. | |
| 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 pendingImplements org.
|
| public Iterable | readDir(String
The remote directory path path)Implements org.
|
| public String | readLink(String
Remote path that represents a link path)Implements org. Retrieve target of a link |
| public void | remove(String
The remote path to remove path)Implements org.
|
| public void | rename(String oldPath, String newPath, Collection<SftpClient.
Implements org.
|
| protected SftpResponse | Returns: theSftpResponsethe command of the request the response is for cmd, int the id of the request requestId)Receives a response buffer, validates and returns it as a |
| public void | rmdir(String
Remote directory path path)Implements org. Remove remote directory |
| protected SftpResponse | Returns: theSftpResponse for the requestthe SFTP command code cmd, Buffer a request)Buffer containing the request dataPerform an SFTP request and wait until the response has been received. |
| public void | setStat(String
The remote path path, SftpClient.The attributesAttributes to updateImplements org. Update remote node meta-data |
| public void | setStat(SftpClient.
The handle,Handle obtained via one of the open callsThe attributesAttributes to updateImplements org. Update remote node meta-data |
| public SftpClient. | stat(String
The remote path path)Implements org. Retrieve remote path meta-data - follow symbolic links if encountered |
| public SftpClient. | stat(SftpClient.
The handleHandle obtained via one of the open callsImplements org. Retrieve file/directory handle meta-data |
| protected void | |
| public void | unlock(SftpClient.
Implements org.
|
| 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)Implements org. Write data to (open) file handle |
| public SftpOutputStreamAsync | write(String
The remote file path path, int The internal write buffer size bufferSize, Collection<SftpClient.The remote file modeOpenModesImplements org. Write to a remote file via an output stream |
| protected <B extends Buffer> B |