Class FTPFileSystemException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.io.IOException
-
- java.nio.file.FileSystemException
-
- com.github.robtimus.filesystems.ftp.FTPFileSystemException
-
- All Implemented Interfaces:
FTPResponse,Serializable
public class FTPFileSystemException extends FileSystemException implements FTPResponse
An exception that is thrown if an FTP command does not execute successfully.- Author:
- Rob Spoor
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FTPFileSystemException(int replyCode, String replyString)Creates a newFTPFileSystemException.FTPFileSystemException(String file, int replyCode, String replyString)Creates a newFTPFileSystemException.FTPFileSystemException(String file, String other, int replyCode, String replyString)Creates a newFTPFileSystemException.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetReplyCode()Returns the reply code of the FTP response.StringgetReplyString()Returns the entire text from the FTP response.-
Methods inherited from class java.nio.file.FileSystemException
getFile, getMessage, getOtherFile, getReason
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
FTPFileSystemException
public FTPFileSystemException(int replyCode, String replyString)Creates a newFTPFileSystemException. This constructor should be used when an operation not involving files fails.- Parameters:
replyCode- The integer value of the reply code of the last FTP reply that triggered this exception.replyString- The entire text from the last FTP response that triggered this exception. It will be used as the exception's reason.
-
FTPFileSystemException
public FTPFileSystemException(String file, int replyCode, String replyString)
Creates a newFTPFileSystemException. This constructor should be used when an operation involving one file fails.- Parameters:
file- A string identifying the file, ornullif not known.replyCode- The integer value of the reply code of the last FTP reply that triggered this exception.replyString- The entire text from the last FTP response that triggered this exception. It will be used as the exception's reason.
-
FTPFileSystemException
public FTPFileSystemException(String file, String other, int replyCode, String replyString)
Creates a newFTPFileSystemException. This constructor should be used when an operation involving two files fails.- Parameters:
file- A string identifying the file, ornullif not known.other- A string identifying the other file, ornullif there isn't another file or if not known.replyCode- The integer value of the reply code of the last FTP reply that triggered this exception.replyString- The entire text from the last FTP response that triggered this exception. It will be used as the exception's reason.
-
-
Method Detail
-
getReplyCode
public int getReplyCode()
Description copied from interface:FTPResponseReturns the reply code of the FTP response.- Specified by:
getReplyCodein interfaceFTPResponse- Returns:
- The integer value of the reply code of the FTP response.
-
getReplyString
public String getReplyString()
Description copied from interface:FTPResponseReturns the entire text from the FTP response.- Specified by:
getReplyStringin interfaceFTPResponse- Returns:
- The entire text from the FTP response.
-
-