com.myjavaworld.ftp
Class FTPException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.myjavaworld.ftp.FTPException
All Implemented Interfaces:
Serializable

public class FTPException
extends Exception

An exception thrown to indicate the command sent was not understood by the remote host or no action is taken because of some reason. Usually, this exception is thrown whenever the server sends a response with a response code starting with 5XX or 4XX. All responses starting with a reponse code of 5XX are permenant negative completion replies and that start with a response code of 4XX are transient negative completion replies.

Version:
2.0
Author:
Sai Pullabhotla, psai [at] jMethods [dot] com
See Also:
Serialized Form

Constructor Summary
FTPException()
          Constructs an FTPException object with "000" as the error code and no descriptive message.
FTPException(String reply)
          Constructs an FTPException object with the reply received from the remote FTP host.
 
Method Summary
 String getErrorCode()
          Returns the error or reply code.
 
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
 

Constructor Detail

FTPException

public FTPException()
Constructs an FTPException object with "000" as the error code and no descriptive message.


FTPException

public FTPException(String reply)
Constructs an FTPException object with the reply received from the remote FTP host. The reply will be parsed to find the reply code and message.

Parameters:
reply - a permenant or transient negative completion reply from the remote host.
Method Detail

getErrorCode

public String getErrorCode()
Returns the error or reply code.

Returns:
Error or reply code.


Copyright © 2000-2012 jMethods, Inc.. All Rights Reserved.