gnu.inet.ftp

Class FTPResponse


public final class FTPResponse
extends java.lang.Object

An FTP control response.

Field Summary

protected int
code
The 3-digit status code.
protected String
data
Multiline data, if present.
protected String
message
The human-readable message.

Constructor Summary

FTPResponse(int code, String message)
Constructs a new FTP response.
FTPResponse(int code, String message, String data)
Constructs a new multiline FTP response.

Method Summary

int
getCode()
Returns the 3-digit status code.
String
getData()
Returns the multiline data, or null if there was no such data.
String
getMessage()
Returns the human-readable message.

Field Details

code

protected final int code
The 3-digit status code.

data

protected final String data
Multiline data, if present.

message

protected final String message
The human-readable message.

Constructor Details

FTPResponse

public FTPResponse(int code,
                   String message)
Constructs a new FTP response.
Parameters:
code - the status code
message - the message

FTPResponse

public FTPResponse(int code,
                   String message,
                   String data)
Constructs a new multiline FTP response.
Parameters:
code - the status code
message - the message
data - multiline data

Method Details

getCode

public int getCode()
Returns the 3-digit status code.

getData

public String getData()
Returns the multiline data, or null if there was no such data.

getMessage

public String getMessage()
Returns the human-readable message.