⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.net.ftp.parser

Class DefaultFTPFileEntryParserFactory

java.lang.Object
|
+--org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory

All Implemented Interfaces:
FTPFileEntryParserFactory


public class DefaultFTPFileEntryParserFactory
extends java.lang.Object
implements FTPFileEntryParserFactory

This is the default implementation of the FTPFileEntryParserFactory interface. This is the implementation that will be used by org.apache.commons.net.ftp.FTPClient.listFiles() if no other implementation has been specified.
See Also:
org.apache.commons.net.ftp.FTPClient.listFiles
org.apache.commons.net.ftp.FTPClient.setParserFactory

Method Summary

FTPFileEntryParser

createFileEntryParser(String key)

This default implementation of the FTPFileEntryParserFactory interface works according to the following logic: First it attempts to interpret the supplied key as a fully qualified classname of a class implementing the FTPFileEntryParser interface.

FTPFileEntryParser

createNTFTPEntryParser()

FTPFileEntryParser

createOS2FTPEntryParser()

FTPFileEntryParser

createOS400FTPEntryParser()

FTPFileEntryParser

createUnixFTPEntryParser()

FTPFileEntryParser

createVMSVersioningFTPEntryParser()

Method Details

createFileEntryParser

public FTPFileEntryParser createFileEntryParser(String key)

This default implementation of the FTPFileEntryParserFactory interface works according to the following logic: First it attempts to interpret the supplied key as a fully qualified classname of a class implementing the FTPFileEntryParser interface. If that succeeds, a parser object of this class is instantiated and is returned.

If key is not recognized as a fully qualified classname known to the system, this method will then attempt to see whether it contains a string identifying one of the known parsers. This comparison is case-insensitive. The intent here is where possible, to select as keys strings which are returned by the SYST command on the systems which the corresponding parser successfully parses. This enables this factory to be used in the auto-detection system.

Parameters:
key - should be a fully qualified classname corresponding to a class implementing the FTPFileEntryParser interface OR a string containing (case-insensitively) one of the following keywords: unix windows os/2 vms
Returns:
the FTPFileEntryParser corresponding to the supplied key.
Throws:
ParserInitializationException - thrown if for any reason the factory cannot resolve the supplied key into an FTPFileEntryParser.
See Also:
FTPFileEntryParser

createNTFTPEntryParser

public FTPFileEntryParser createNTFTPEntryParser()


createOS2FTPEntryParser

public FTPFileEntryParser createOS2FTPEntryParser()


createOS400FTPEntryParser

public FTPFileEntryParser createOS400FTPEntryParser()


createUnixFTPEntryParser

public FTPFileEntryParser createUnixFTPEntryParser()


createVMSVersioningFTPEntryParser

public FTPFileEntryParser createVMSVersioningFTPEntryParser()