APIdia Launch Partner
Top Description Fields Constructors Methods
sun.net.ftp

public Class FtpProtocolException

extends Exception
Class Inheritance

Thrown to indicate that the FTP server reported an error. For instance that the requested file doesn't exist or that a command isn't supported.

The specific error code can be retrieved with getReplyCode().

Author
Jonathan Payne

Field Summary

Modifier and TypeField and Description
private final FtpReplyCode
private static final long

Constructor Summary

AccessConstructor and Description
public
FtpProtocolException(String
the detail message.
detail
)

Constructs a new FtpProtocolException from the specified detail message.

public
FtpProtocolException(String
the detail message.
detail
,
FtpReplyCode
The FtpRelyCode received from server.
code
)

Constructs a new FtpProtocolException from the specified response code and exception detail message

Method Summary

Modifier and TypeMethod and Description
public FtpReplyCode

Returns:

The FtpReplyCode associated with that exception.
getReplyCode
()

Gets the reply code sent by the server that led to this exception being thrown.

Field Detail

codeback to summary
private final FtpReplyCode code
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

Annotations
@Serial

Constructor Detail

FtpProtocolExceptionback to summary
public FtpProtocolException(String detail)

Constructs a new FtpProtocolException from the specified detail message. The reply code is set to unknown error.

Parameters
detail:String

the detail message.

FtpProtocolExceptionback to summary
public FtpProtocolException(String detail, FtpReplyCode code)

Constructs a new FtpProtocolException from the specified response code and exception detail message

Parameters
detail:String

the detail message.

code:FtpReplyCode

The FtpRelyCode received from server.

Method Detail

getReplyCodeback to summary
public FtpReplyCode getReplyCode()

Gets the reply code sent by the server that led to this exception being thrown.

Returns:FtpReplyCode

The FtpReplyCode associated with that exception.