public class Reply extends Object implements Serializable
Represents the FTP reply.
Modifier and Type | Field and Description |
---|---|
protected int |
category |
protected int |
code |
protected boolean |
isMultiline |
protected String |
message |
static int |
PERMANENT_NEGATIVE_COMPLETION |
static int |
POSITIVE_COMPLETION |
static int |
POSITIVE_INTERMEDIATE |
static int |
POSITIVE_PRELIMINARY |
static int |
TRANSIENT_NEGATIVE_COMPLETION |
Modifier | Constructor and Description |
---|---|
protected |
Reply() |
|
Reply(BufferedReader input) |
Modifier and Type | Method and Description |
---|---|
int |
getCategory() |
int |
getCode() |
String |
getMessage()
Returns the text that came with the reply, between the leading space and
terminating CRLF, excluding the mentioned space and CRLF.
|
protected static String |
ignoreLeading0(String line)
GT2.0 wuftp server incorrectly inserts \0 between lines.
|
boolean |
isMultiline() |
static boolean |
isPermanentNegativeCompletion(Reply reply) |
static boolean |
isPositiveCompletion(Reply reply) |
static boolean |
isPositiveIntermediate(Reply reply) |
static boolean |
isPositivePreliminary(Reply reply) |
static boolean |
isTransientNegativeCompletion(Reply reply) |
String |
toString() |
public static final int POSITIVE_PRELIMINARY
public static final int POSITIVE_COMPLETION
public static final int POSITIVE_INTERMEDIATE
public static final int TRANSIENT_NEGATIVE_COMPLETION
public static final int PERMANENT_NEGATIVE_COMPLETION
protected String message
protected int code
protected int category
protected boolean isMultiline
protected Reply()
public Reply(BufferedReader input) throws FTPReplyParseException, EOFException, IOException
EOFException
- on end of streamIOException
- on I/O problemFTPReplyParseException
- if cannot parsepublic int getCategory()
public int getCode()
public boolean isMultiline()
public String getMessage()
Returns the text that came with the reply, between the leading space and terminating CRLF, excluding the mentioned space and CRLF.
If the reply is multi-line, this returns the text between the leading dash "-" and the CRLF following the last line, excluding the mentioned dash and CRLF. Note that lines are separated by the local line separator [as returned by System.getProperty("line.separator")] rather than CRLF.
public static boolean isPositivePreliminary(Reply reply)
public static boolean isPositiveCompletion(Reply reply)
public static boolean isPositiveIntermediate(Reply reply)
public static boolean isTransientNegativeCompletion(Reply reply)
public static boolean isPermanentNegativeCompletion(Reply reply)
Copyright © 2016. All rights reserved.