Package org.globus.ftp.vanilla
Class Reply
- java.lang.Object
-
- org.globus.ftp.vanilla.Reply
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
LocalReply
public class Reply extends java.lang.Object implements java.io.Serializable
Represents the FTP reply.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
category
protected int
code
protected boolean
isMultiline
private static org.apache.commons.logging.Log
logger
protected java.lang.String
message
private static int
MIN_FIRST_LEN
static int
PERMANENT_NEGATIVE_COMPLETION
static int
POSITIVE_COMPLETION
static int
POSITIVE_INTERMEDIATE
static int
POSITIVE_PRELIMINARY
static int
TRANSIENT_NEGATIVE_COMPLETION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCategory()
int
getCode()
java.lang.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 java.lang.String
ignoreLeading0(java.lang.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)
java.lang.String
toString()
-
-
-
Field Detail
-
logger
private static org.apache.commons.logging.Log logger
-
POSITIVE_PRELIMINARY
public static final int POSITIVE_PRELIMINARY
- See Also:
- Constant Field Values
-
POSITIVE_COMPLETION
public static final int POSITIVE_COMPLETION
- See Also:
- Constant Field Values
-
POSITIVE_INTERMEDIATE
public static final int POSITIVE_INTERMEDIATE
- See Also:
- Constant Field Values
-
TRANSIENT_NEGATIVE_COMPLETION
public static final int TRANSIENT_NEGATIVE_COMPLETION
- See Also:
- Constant Field Values
-
PERMANENT_NEGATIVE_COMPLETION
public static final int PERMANENT_NEGATIVE_COMPLETION
- See Also:
- Constant Field Values
-
MIN_FIRST_LEN
private static final int MIN_FIRST_LEN
- See Also:
- Constant Field Values
-
message
protected java.lang.String message
-
code
protected int code
-
category
protected int category
-
isMultiline
protected boolean isMultiline
-
-
Constructor Detail
-
Reply
protected Reply()
-
Reply
public Reply(java.io.BufferedReader input) throws FTPReplyParseException, java.io.EOFException, java.io.IOException
- Throws:
java.io.EOFException
- on end of streamjava.io.IOException
- on I/O problemFTPReplyParseException
- if cannot parse
-
-
Method Detail
-
getCategory
public int getCategory()
- Returns:
- the first digit of the reply code.
-
getCode
public int getCode()
- Returns:
- the reply code
-
isMultiline
public boolean isMultiline()
-
getMessage
public java.lang.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.
-
isPositivePreliminary
public static boolean isPositivePreliminary(Reply reply)
-
isPositiveCompletion
public static boolean isPositiveCompletion(Reply reply)
-
isPositiveIntermediate
public static boolean isPositiveIntermediate(Reply reply)
-
isTransientNegativeCompletion
public static boolean isTransientNegativeCompletion(Reply reply)
-
isPermanentNegativeCompletion
public static boolean isPermanentNegativeCompletion(Reply reply)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
ignoreLeading0
protected static java.lang.String ignoreLeading0(java.lang.String line)
GT2.0 wuftp server incorrectly inserts \0 between lines. We have to deal with that.
-
-