ZetaGrid v1.9

zeta.tool
Class FTP.Response

java.lang.Object
  |
  +--zeta.tool.FTP.Response
Enclosing class:
FTP

private static class FTP.Response
extends java.lang.Object

Encompasses the FTP server's response - code and message


Field Summary
private  int code
           
private  java.lang.String text
           
 
Constructor Summary
FTP.Response(java.lang.String replyLine)
          Constructor based on an FTP server's reply
 
Method Summary
 boolean canContinue()
          Determines if the response code is affirmative, i.e.
 int getCode()
          Returns the replay code, i.e. the numeric presentation of reply as a number.
 java.lang.String getText()
          Returns the reply.
static boolean isValid(java.lang.String line)
          Determines if the response has a correct format: The first 3 characters are digits followed by a blank.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code

private int code

text

private java.lang.String text
Constructor Detail

FTP.Response

public FTP.Response(java.lang.String replyLine)
             throws java.io.IOException
Constructor based on an FTP server's reply

Method Detail

isValid

public static boolean isValid(java.lang.String line)
Determines if the response has a correct format: The first 3 characters are digits followed by a blank.

Parameters:
line - response

getCode

public int getCode()
Returns the replay code, i.e. the numeric presentation of reply as a number.

Returns:
the replay code, i.e. the numeric presentation of reply as a number.

getText

public java.lang.String getText()
Returns the reply.

Returns:
reply as string

canContinue

public boolean canContinue()
Determines if the response code is affirmative, i.e. the codes must be between 100 and 399 (inclusive), other codes indicate errors/problems


ZetaGrid v1.9

For further technical papers, see ZetaGrid Technical Documentation.
 
Copyright © 2001,2002 Sebastian Wedeniwski. All Rights Reserved.