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 FTPFileParser

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

Direct Known Subclasses:
  MLSXEntryParser, UnixFileParser, VMSFileParser, WindowsFileParser

    public abstract class FTPFileParser

extends java.lang.Object

Root class of all file parsers

Version:
  $Revision: 1.9 $
Author:
  Bruce Blackshaw

Field Summary
`protected boolean` | `ignoreDateParseErrors` Ignore date parsing errors

Constructor Summary
`FTPFileParser()`

Method Summary
`abstract FTPFile` | `parse(java.lang.String raw)` Parse server supplied string
`void` | `setIgnoreDateParseErrors(boolean ignore)` Ignore date parse errors
`abstract void` | `setLocale(java.util.Locale locale)` Set the locale for date parsing of listings
`protected java.lang.String[]` | `split(java.lang.String str)` Splits string consisting of fields separated by whitespace into an array of strings.
`protected java.lang.String[]` | `split(java.lang.String str, char token)` Splits string consisting of fields separated by whitespace into an array of strings.
`protected java.lang.String[]` | `split(java.lang.String str, com.enterprisedt.net.ftp.FTPFileParser.Splitter splitter)` Splits string consisting of fields separated by whitespace into an array of strings.
`protected java.lang.String` | `trimStart(java.lang.String str)` Trim the start of the supplied string

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

Field Detail

### ignoreDateParseErrors

    protected boolean ignoreDateParseErrors

  Ignore date parsing errors

Constructor Detail

### FTPFileParser

    public FTPFileParser()

Method Detail

### parse

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

  Parse server supplied string

  Parameters:
    `raw` - raw string to parse
  Throws:
    `java.text.ParseException`

### setLocale

    public abstract void setLocale(java.util.Locale locale)

  Set the locale for date parsing of listings

  Parameters:
    `locale` - locale to set

### setIgnoreDateParseErrors

    public void setIgnoreDateParseErrors(boolean ignore)

  Ignore date parse errors

  Parameters:
    `ignore` -

### trimStart

    protected java.lang.String trimStart(java.lang.String str)

  Trim the start of the supplied string

  Parameters:
    `str` - string to trim
  Returns:
    string trimmed of whitespace at the start

### split

    protected java.lang.String[] split(java.lang.String str)

  Splits string consisting of fields separated by whitespace into an array of strings. Yes, we could use String.split() but this would restrict us to 1.4+

  Parameters:
    `str` - string to split
  Returns:
    array of fields

### split

    protected java.lang.String[] split(java.lang.String str,
                                       char token)

  Splits string consisting of fields separated by whitespace into an array of strings. Yes, we could use String.split() but this would restrict us to 1.4+

  Parameters:
    `str` - string to split
  Returns:
    array of fields

### split

    protected java.lang.String[] split(java.lang.String str,
                                       com.enterprisedt.net.ftp.FTPFileParser.Splitter splitter)

  Splits string consisting of fields separated by whitespace into an array of strings. Yes, we could use String.split() but this would restrict us to 1.4+

  Parameters:
    `str` - string to split
  Returns:
    array of fields

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.