cz.dhl.ftp
Class FtpSetting

java.lang.Object
  extended bycz.dhl.ftp.FtpSetting
Direct Known Subclasses:
FtpContext

public class FtpSetting
extends java.lang.Object

Wrapper for FTP client settings.

Version:
0.72 08/10/2003
Author:
Bea Petrovicova
See Also:
Ftp

Field Summary
static int LIST
          ListCommandMode option, gives detailed information on file but might not work well on other than implemented server systems.
static int NAME_LIST
          ListCommandMode option, lists only filenames using FTP NLST command.
static int NAME_LIST_LS_F
          ListCommandMode option, similar to NAME_LIST except directories, executables and special files are recognized.
static int NAME_LIST_LS_LA
          ListCommandMode option, gives detailed information on file.
static int NAME_LIST_LS_P
          ListCommandMode option, similar to NAME_LIST except directories are recognized.
 
Constructor Summary
FtpSetting()
           
 
Method Summary
 boolean getActiveSocketMode()
          Get active socket mode.
 char getFileTransferMode()
          Gets transfer mode.
 int getListCommandMode()
          Gets type of list command used.
 void setActiveSocketMode(boolean activesocketmode)
          Sets active socket mode.
 void setFileTransferMode(char filetransfermode)
          Sets transfer mode.
 void setListCommandMode(int listcommandmode)
          Sets type of list command used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LIST

public static final int LIST
ListCommandMode option, gives detailed information on file but might not work well on other than implemented server systems.

Traditional UNIX system:
% ll
-rw-r--r-- 1 owner group 239 Nov  9  1998 file
drw-r--r-- 1 owner group  58 Nov 12 13:51 dir

MS Windows system:
C:\> dir
10-16-01 11:35PM 1479  file
10-16-01 11:37PM

folder

See Also:
Constant Field Values

NAME_LIST

public static final int NAME_LIST
ListCommandMode option, lists only filenames using FTP NLST command.

Warning! Directories are recognized by not containing a dot (.) letter and might not correspond to real directories.

See Also:
Constant Field Values

NAME_LIST_LS_F

public static final int NAME_LIST_LS_F
ListCommandMode option, similar to NAME_LIST except directories, executables and special files are recognized.

Might not work well on other than UNIX server systems.

% ls -F

Put a slash (/) after each file name if that file is a directory or a symbolic link to a directory; put an asterisk (*) after each file name if that file is executable; put an at sign (@) after each file name if that file is a symbolic link to a file.

See Also:
Constant Field Values

NAME_LIST_LS_LA

public static final int NAME_LIST_LS_LA
ListCommandMode option, gives detailed information on file.

Might not work well on other than UNIX server systems.

% ls -la
-rw-r--r-- 1 owner group 239 Nov  9  1998 file
drw-r--r-- 1 owner group  58 Nov 12 13:51 folder

See Also:
Constant Field Values

NAME_LIST_LS_P

public static final int NAME_LIST_LS_P
ListCommandMode option, similar to NAME_LIST except directories are recognized.

Might not work well on other than UNIX server systems.

% ls -p

Put a slash (/) after each file name if that file is a directory.

See Also:
Constant Field Values
Constructor Detail

FtpSetting

public FtpSetting()
Method Detail

getActiveSocketMode

public boolean getActiveSocketMode()
Get active socket mode.

Returns:
true stands for active socket / false for pasive socket

getFileTransferMode

public char getFileTransferMode()
Gets transfer mode.

Returns:
one of following optional values; 'A'=ASCII, 'I'=BINARY files, 'S'=Smart; smart mode evaluates transfer mode by current TextFilter settings

getListCommandMode

public int getListCommandMode()
Gets type of list command used.

Returns:
one of following optional values;
See Also:
LIST, NAME_LIST, NAME_LIST_LS_P, NAME_LIST_LS_F, NAME_LIST_LS_LA

setActiveSocketMode

public void setActiveSocketMode(boolean activesocketmode)
Sets active socket mode.

Parameters:
activesocketmode - true stands for active socket / false for pasive socket

setFileTransferMode

public void setFileTransferMode(char filetransfermode)
Sets transfer mode.

Parameters:
filetransfermode - must be one of following optional values; 'A'=ASCII, 'I'=BINARY files, 'S'=Smart; smart mode evaluates transfer mode by current TextFilter settings

setListCommandMode

public void setListCommandMode(int listcommandmode)
Sets type of list command used.

Parameters:
listcommandmode - must be one of following optional values;
See Also:
LIST, NAME_LIST, NAME_LIST_LS_P, NAME_LIST_LS_F, NAME_LIST_LS_LA


Available from sourceforge http://sourceforge.net/projects/jvftp under the terms of GNU Lesser General Public License (LGPL).