edtFTPj

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 Object

Root class of all file parsers

Version:
$Revision: 1.7 $
Author:
Bruce Blackshaw

Constructor Summary
FTPFileParser()
           
 
Method Summary
abstract  FTPFile parse(String raw)
          Parse server supplied string
abstract  void setLocale(Locale locale)
          Set the locale for date parsing of listings
protected  String[] split(String str)
          Splits string consisting of fields separated by whitespace into an array of strings.
protected  String[] split(String str, char token)
          Splits string consisting of fields separated by whitespace into an array of strings.
protected  String[] split(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(String raw)
                       throws ParseException
Parse server supplied string

Parameters:
raw - raw string to parse
Throws:
ParseException

setLocale

public abstract void setLocale(Locale locale)
Set the locale for date parsing of listings

Parameters:
locale - locale to set

split

protected String[] split(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 String[] split(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 String[] split(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

edtFTPj

Copyright © 2000-2007 Enterprise Distributed Technologies. All Rights Reserved.