Package com.enterprisedt.net.ftp
Class ServerStrings
java.lang.Object
com.enterprisedt.net.ftp.ServerStrings
- Direct Known Subclasses:
DirectoryEmptyStrings,FileNotFoundStrings,TransferCompleteStrings
Manages strings that match various FTP server replies for
various situations. The strings are not exact copies of server
replies, but rather fragments that match server replies (so that
as many servers as possible can be supported). All fragments are
managed internally in upper case to make matching faster.
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a fragment to be managedvoidclearAll()Clear all fragments being managedString[]getAll()Get all fragments being managedbooleanReturns true if any fragment is found in the supplied string.booleanRemove a managed fragment.intsize()Fragment count
-
Constructor Details
-
ServerStrings
public ServerStrings()
-
-
Method Details
-
add
Add a fragment to be managed- Parameters:
string- new message fragment
-
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
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
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
-