com.enterprisedt.net.ftp
Class FTPFileParser

java.lang.Object
  extended by 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.7 $
Author:
Bruce Blackshaw

Constructor Summary
FTPFileParser()
           
 
Method Summary
abstract  FTPFile parse(java.lang.String raw)
          Parse server supplied string
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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


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