Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.enterprisedt.net.ftp
Class FTPFileFactory

    java.lang.Object
      com.enterprisedt.net.ftp.FTPFileFactory

    public class FTPFileFactory

extends java.lang.Object

Factory for creating FTPFile objects

Version:
  $Revision: 1.24 $
Author:
  Bruce Blackshaw

Field Summary
`static java.lang.String` | `cvsId` Revision control id

Constructor Summary
`FTPFileFactory(FTPFileParser parser)` Constructor.
`FTPFileFactory(java.lang.String system)` Constructor

Method Summary
`void` | `addParser(FTPFileParser parser)` Rather than forcing a parser (as in the constructor that accepts a parser), this adds a parser to the list of those used.
`java.lang.String` | `getSystem()` Get the SYST string
`VMSFileParser` | `getVMSParser()` Return a reference to the VMS parser being used.
`FTPFile` | `parse(java.lang.String line)` Parse a single line of file listing
`FTPFile[]` | `parse(java.lang.String[] files)` Parse an array of raw file information returned from the FTP server
`void` | `setLocale(java.util.Locale locale)` Set the locale for date parsing of listings
`void` | `setLocales(java.util.Locale[] locales)` Set the locales to try for date parsing of listings
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### cvsId

    public static final java.lang.String cvsId

  Revision control id

  See Also:
    Constant Field Values

Constructor Detail

### FTPFileFactory

    public FTPFileFactory(java.lang.String system)
                   throws FTPException

  Constructor

  Parameters:
    `system` - SYST string
  Throws:
    `FTPException`

### FTPFileFactory

    public FTPFileFactory(FTPFileParser parser)

  Constructor. User supplied parser. Note that parser rotation (in case of a ParseException) is disabled if a parser is explicitly supplied

  Parameters:
    `parser` - the parser to use

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getVMSParser

    public VMSFileParser getVMSParser()

  Return a reference to the VMS parser being used. This allows the user to set VMS-specific settings on the parser.

  Returns:
    VMSFileParser object

### addParser

    public void addParser(FTPFileParser parser)

  Rather than forcing a parser (as in the constructor that accepts a parser), this adds a parser to the list of those used.

  Parameters:
    `parser` - user supplied parser to add

### setLocale

    public void setLocale(java.util.Locale locale)

  Set the locale for date parsing of listings

  Parameters:
    `locale` - locale to set

### setLocales

    public void setLocales(java.util.Locale[] locales)

  Set the locales to try for date parsing of listings

  Parameters:
    `locales` - locales to try

### parse

    public FTPFile parse(java.lang.String line)
                  throws java.text.ParseException

  Parse a single line of file listing

  Parameters:
    `line` -
  Returns:
    FTPFile
  Throws:
    `java.text.ParseException`

### parse

    public FTPFile[] parse(java.lang.String[] files)
                    throws java.text.ParseException

  Parse an array of raw file information returned from the FTP server

  Parameters:
    `files` - array of strings
  Returns:
    array of FTPFile objects
  Throws:
    `java.text.ParseException`

### getSystem

    public java.lang.String getSystem()

  Get the SYST string

  Returns:
    the system string.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2001-2007 Enterprise Distributed Technologies Ltd. All Rights Reserved.