com.enterprisedt.net.ftp
Class FTPFileParser

java.lang.Object
  extended bycom.enterprisedt.net.ftp.FTPFileParser
Direct Known Subclasses:
UnixFileParser, WindowsFileParser

public abstract class FTPFileParser
extends java.lang.Object

Root class of all file parsers

Version:
$Revision: 1.1 $
Author:
Bruce Blackshaw

Constructor Summary
FTPFileParser()
           
 
Method Summary
abstract  FTPFile parse(java.lang.String raw)
          Parse server supplied string.
protected  java.lang.String[] split(java.lang.String str)
          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. Should be in form 05-17-03 02:47PM 70776 ftp.jar 08-28-03 10:08PM EDTSSLTest

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

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


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