Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jsd.ftp.server.ftp
Class FtpStatus  view FtpStatus download FtpStatus.java

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended byjsd.ftp.server.ftp.FtpStatus
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class FtpStatus
extends java.util.Properties

Ftp status line parser class. This class loads FtpStatus.properties file from the classpath. It generates the descriptive ftp status for astatus code. The actual response depends on the status code, the ftp command and the passed argument list.


Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private static java.lang.String ARG
           
private static java.lang.String CMD
           
private static java.lang.String CRLF
           
private static java.lang.String EMPTY
           
private static java.lang.String PREFIX
           
private static java.lang.String RESOURCE
           
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
FtpStatus()
          Load status propeties file from the classpath.
 
Method Summary
private  java.lang.String getMessage(int status, FtpRequest cmdLine, java.lang.String[] args)
          Get ftp message from the properties file and replace the variables.
private  java.lang.String getParam(FtpRequest cmdLine, java.lang.String[] elms, java.lang.String intStr)
          Get variable value.
 java.lang.String getResponse(int status, FtpRequest cmd, FtpUser user, java.lang.String[] args)
          Get ftp response.
 java.lang.String processNewLine(java.lang.String msg, int status)
          Process ftp response new line character.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final java.lang.String RESOURCE
See Also:
Constant Field Values

PREFIX

private static final java.lang.String PREFIX
See Also:
Constant Field Values

EMPTY

private static final java.lang.String EMPTY
See Also:
Constant Field Values

CRLF

private static final java.lang.String CRLF
See Also:
Constant Field Values

CMD

private static final java.lang.String CMD
See Also:
Constant Field Values

ARG

private static final java.lang.String ARG
See Also:
Constant Field Values
Constructor Detail

FtpStatus

public FtpStatus()
          throws java.io.IOException
Load status propeties file from the classpath.

Method Detail

processNewLine

public java.lang.String processNewLine(java.lang.String msg,
                                       int status)
Process ftp response new line character.


getMessage

private java.lang.String getMessage(int status,
                                    FtpRequest cmdLine,
                                    java.lang.String[] args)
Get ftp message from the properties file and replace the variables.


getParam

private java.lang.String getParam(FtpRequest cmdLine,
                                  java.lang.String[] elms,
                                  java.lang.String intStr)
Get variable value.


getResponse

public java.lang.String getResponse(int status,
                                    FtpRequest cmd,
                                    FtpUser user,
                                    java.lang.String[] args)
Get ftp response.