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

Quick Search    Search Deep

org.finj.test
Class FTPClientTest  view FTPClientTest download FTPClientTest.java

java.lang.Object
  extended byorg.finj.FTPClient
      extended byorg.finj.test.FTPClientTest

public class FTPClientTest
extends org.finj.FTPClient

The configuration used by the FTPClientTest is embodied in a .properties file. If no file is provided, then the default configuration is used :

# connection settings
 host = localhost
 port = 21
 
 # login settings
 user = finj
 pass = ,finj.test
 
 # directory settings
 path = /tmp
 temp = finj
 file = test.txt
Any of those values can be overriden in a file named FTPClientTestConfiguration.properties placed in CLASSPATH before finj binaries, and using the same syntax. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Version:
$Id: FTPClientTest.java,v 1.5 2003/10/22 08:26:26 jiglesia Exp $

Field Summary
private  java.util.ResourceBundle config
           
private static java.lang.String CONFIGURATION_FILE
           
private  java.lang.String file
           
private static java.lang.String FILE_PARAM
           
private  java.lang.String host
           
private static java.lang.String HOST_PARAM
           
private  char[] pass
           
private static java.lang.String PASS_PARAM
           
private  java.lang.String path
           
private static java.lang.String PATH_PARAM
           
private  int port
           
private static java.lang.String PORT_PARAM
           
private  java.lang.String temp
           
private static java.lang.String TEMP_PARAM
           
private  java.lang.String user
           
private static java.lang.String USER_PARAM
           
 
Fields inherited from class org.finj.FTPClient
ASCII_DATA_TYPE, BLOCK_DATA_TRANSMISSION_MODE, COMPRESSED_DATA_TRANSMISSION_MODE, DEFAULT_FTP_PORT, DEFAULT_LOCALE, EBCDIC_DATA_TYPE, FILE_DATA_STRUCTURE, IMAGE_DATA_TYPE, LOCAL_DATA_TYPE, PAGE_DATA_STRUCTURE, RECORD_DATA_STRUCTURE, STREAM_DATA_TRANSMISSION_MODE
 
Constructor Summary
FTPClientTest()
           
 
Method Summary
 java.lang.String[] getFileNames(boolean passive)
           
 java.lang.String[] getServerStatus()
          Returns the status response from the server.
 void makeDirectory()
           
 void open()
           
 void removeDirectory()
           
 void setWorkingDirectory()
           
 
Methods inherited from class org.finj.FTPClient
abortCommand, allocateSpace, allocateSpace, appendToFile, ascii, binary, broadcastCommand, broadcastReply, cd, checkConnection, close, closeServer, dataReceived, dataSent, deleteFile, doSite, get, getDataPort, getDataStructure, getDataTransferMode, getDataType, getFile, getFileDescriptors, getFileDescriptors, getFileFrom, getFileNames, getFileNames, getObserver, getServerStatus, getServerSystemName, getWorkingDirectory, hasObserver, isConnected, isConnected, login, logout, makeDirectory, mountStructure, notValidReplyCodeMessage, open, open, openServer, openServer, put, putFile, putUniqueFile, readFTPReply, readLineFromControlConnection, readMultilineReply, removeDirectory, removeObserver, renameFile, sendFTPCommand, setAccount, setDataPort, setDataPort, setDataPort, setDataStructure, setDataTransferMode, setDataType, setDataType, setObserver, setPassive, setWorkingDirectory, setWorkingDirectoryUp, toByteArray, toByteArray, toInt, toUnsignedShort, writeLineToControlConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_FILE

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

HOST_PARAM

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

PORT_PARAM

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

USER_PARAM

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

PASS_PARAM

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

PATH_PARAM

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

TEMP_PARAM

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

FILE_PARAM

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

config

private java.util.ResourceBundle config

host

private java.lang.String host

port

private int port

user

private java.lang.String user

pass

private char[] pass

path

private java.lang.String path

temp

private java.lang.String temp

file

private java.lang.String file
Constructor Detail

FTPClientTest

public FTPClientTest()
              throws java.io.IOException
Since:
v1.0.2
Method Detail

open

public void open()
          throws java.io.IOException
Since:
v1.0.2

makeDirectory

public void makeDirectory()
                   throws java.io.IOException
Since:
v1.0.2

removeDirectory

public void removeDirectory()
                     throws java.io.IOException
Since:
v1.0.2

setWorkingDirectory

public void setWorkingDirectory()
                         throws java.io.IOException
Since:
v1.0.2

getFileNames

public java.lang.String[] getFileNames(boolean passive)
                                throws java.io.IOException
Since:
v1.0.2

getServerStatus

public java.lang.String[] getServerStatus()
                                   throws java.io.IOException
Description copied from class: org.finj.FTPClient
Returns the status response from the server. This method may be called during a file transfer in which case the server will respond with the status of the operation progress, or it may be sent between file transfers.

Since:
v1.0.2