RemoteSession. All
operations are supposed to throw FtpException for remote file system
errors and other IOExceptions on connection errors.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | FtpChannel.
Simplified remote directory entry. |
| public static class | FtpChannel.
An |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | connect(int
for establishing the FTP connection timeout, TimeUnit of the unit)timeoutConnects the |
| public default void | |
| public void | |
| public InputStream | Returns: the stream to read fromof the file to read path)Obtain an |
| public boolean | |
| public Collection | |
| public void | |
| public OutputStream | Returns: the stream to read fromof the file to read path)Obtain an |
| public String | |
| public void | |
| public void | |
| public void |
| cd | back to summary |
|---|---|
| public void cd(String path) throws IOException Changes the current remote directory.
| |
| connect | back to summary |
|---|---|
| public void connect(int timeout, TimeUnit unit) throws IOException Connects the
| |
| delete | back to summary |
|---|---|
| public default void delete(String path) throws IOException Deletes a file on the remote file system. If the file does not exist, no exception is thrown.
| |
| disconnect | back to summary |
|---|---|
| public void disconnect() Disconnects and | |
| get | back to summary |
|---|---|
| public InputStream get(String path) throws IOException Obtain an
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Whether the FtpChannel is connected
| |
| ls | back to summary |
|---|---|
| public Collection Lists contents of a remote directory
| |
| mkdir | back to summary |
|---|---|
| public void mkdir(String path) throws IOException Creates a directory on the remote file system.
| |
| put | back to summary |
|---|---|
| public OutputStream put(String path) throws IOException Obtain an
| |
| pwd | back to summary |
|---|---|
| public String pwd() throws IOException Get current remote directory path
| |
| rename | back to summary |
|---|---|
| public void rename(String from, String to) throws IOException Renames a file on the remote file system. If
| |
| rm | back to summary |
|---|---|
| public void rm(String path) throws IOException Deletes a file on the remote file system.
| |
| rmdir | back to summary |
|---|---|
| public void rmdir(String path) throws IOException Deletes a directory on the remote file system. The directory must be empty.
| |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public long | |
| public boolean |
| getFilename | back to summary |
|---|---|
| public String getFilename() | |
| getModifiedTime | back to summary |
|---|---|
| public long getModifiedTime() | |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() | |
Exception for reporting SFTP errors.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private static final long | |
| private final int | |
| public static final int | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| EOF | back to summary |
|---|---|
| public static final int EOF | |
| NO_PERMISSION | back to summary |
|---|---|
| public static final int NO_PERMISSION | |
| NO_SUCH_FILE | back to summary |
|---|---|
| public static final int NO_SUCH_FILE | |
| OK | back to summary |
|---|---|
| public static final int OK | |
| PROTOCOL_ERROR | back to summary |
|---|---|
| public static final int PROTOCOL_ERROR | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| status | back to summary |
|---|---|
| private final int status | |
| UNSPECIFIED_FAILURE | back to summary |
|---|---|
| public static final int UNSPECIFIED_FAILURE | |
| UNSUPPORTED | back to summary |
|---|---|
| public static final int UNSUPPORTED | |
| FtpException | back to summary |
|---|---|
| public FtpException(String message, int status) | |
| FtpException | back to summary |
|---|---|
| public FtpException(String message, int status, Throwable cause) | |
| getStatus | back to summary |
|---|---|
| public int getStatus() | |