edtFTPj

com.enterprisedt.net.ftp
Class DirectoryEmptyStrings

java.lang.Object
  extended by com.enterprisedt.net.ftp.DirectoryEmptyStrings

public final class DirectoryEmptyStrings
extends Object

Contains fragments of server replies that indicate no files were found in a supplied directory.

Version:
$Revision: 1.1 $
Author:
Bruce Blackshaw

Field Summary
static String EMPTY_DIR
          Server string indicating no files found (EMPTY_DIR)
static String NO_DATA_SETS_FOUND
          Server string for OS/390 indicating no files found (NO_DATA_SETS_FOUND)
static String NO_FILES
          Server string indicating no files found (NO_FILES)
static String NO_SUCH_FILE_OR_DIR
          Server string indicating no files found (wu-ftpd) (NO_SUCH_FILE_OR_DIR)
 
Constructor Summary
DirectoryEmptyStrings()
          Constructor.
 
Method Summary
 void add(String string)
          Add a fragment to be managed
 void clearAll()
          Clear all fragments being managed
 String[] getAll()
          Get all fragments being managed
 boolean matches(String reply)
          Returns true if any fragment is found in the supplied string.
 boolean remove(String string)
          Remove a managed fragment.
 int size()
          Fragment count
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_FILES

public static final String NO_FILES
Server string indicating no files found (NO_FILES)

See Also:
Constant Field Values

NO_SUCH_FILE_OR_DIR

public static final String NO_SUCH_FILE_OR_DIR
Server string indicating no files found (wu-ftpd) (NO_SUCH_FILE_OR_DIR)

See Also:
Constant Field Values

EMPTY_DIR

public static final String EMPTY_DIR
Server string indicating no files found (EMPTY_DIR)

See Also:
Constant Field Values

NO_DATA_SETS_FOUND

public static final String NO_DATA_SETS_FOUND
Server string for OS/390 indicating no files found (NO_DATA_SETS_FOUND)

See Also:
Constant Field Values
Constructor Detail

DirectoryEmptyStrings

public DirectoryEmptyStrings()
Constructor. Adds the fragments to match on

Method Detail

add

public void add(String string)
Add a fragment to be managed

Parameters:
string - new message fragment

getAll

public String[] getAll()
Get all fragments being managed

Returns:
array of management fragments

clearAll

public void clearAll()
Clear all fragments being managed


size

public int size()
Fragment count

Returns:
number of fragments being managed

remove

public boolean remove(String string)
Remove a managed fragment. Only exact matches (ignoring case) are removed

Parameters:
string - string to be removed
Returns:
true if removed, false if not found

matches

public boolean matches(String reply)
Returns true if any fragment is found in the supplied string.

Parameters:
reply - server reply to test for matches
Returns:
true for a match, false otherwise

edtFTPj

Copyright © 2000-2007 Enterprise Distributed Technologies. All Rights Reserved.