FTP Client

com.amoebacode.ftp
Class IllegalFTPResponseException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended bycom.amoebacode.ftp.IllegalFTPResponseException
All Implemented Interfaces:
java.io.Serializable

public class IllegalFTPResponseException
extends java.io.IOException

IllegalFTPResponseException is thrown whenever an FTP server returns an unexpected response to the previous command.

See Also:
Serialized Form

Field Summary
private  FTPServerResponse response
          The FTP server response that led to this exception
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
protected IllegalFTPResponseException(FTPServerResponse response)
          Default protected constructor.
 
Method Summary
 int getResponseCode()
          Returns the numeric code from the FTP server response.
 java.lang.String getResponseMessage()
          Returns the text message from the FTP server response.
 boolean isActionNotTaken()
          Indicates whether the FTP server response code indicates that the requested action was not taken.
 boolean isDirectoryExistsError()
          Indicates whether the FTP server response code indicates that the directory already exists.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

response

private FTPServerResponse response
The FTP server response that led to this exception

Constructor Detail

IllegalFTPResponseException

protected IllegalFTPResponseException(FTPServerResponse response)
Default protected constructor.

Parameters:
response - the FTP server response that led to this exception
Method Detail

getResponseCode

public int getResponseCode()
Returns the numeric code from the FTP server response.

Returns:
the FTP server response code

getResponseMessage

public java.lang.String getResponseMessage()
Returns the text message from the FTP server response.

Returns:
the FTP server text message

isDirectoryExistsError

public boolean isDirectoryExistsError()
Indicates whether the FTP server response code indicates that the directory already exists.

Returns:
true if the response code indicates that the directory exists

isActionNotTaken

public boolean isActionNotTaken()
Indicates whether the FTP server response code indicates that the requested action was not taken.

Returns:
true if the response code indicates that the requested action was not taken

FTP Client