|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.net.ftp.FTPFileEntryParserImpl
org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl
org.apache.commons.net.ftp.parser.VMSFTPEntryParser
Implementation FTPFileEntryParser and FTPFileListParser for VMS Systems. This is a sample of VMS LIST output "1-JUN.LIS;1 9/9 2-JUN-1998 07:32:04 [GROUP,OWNER] (RWED,RWED,RWED,RE)", "1-JUN.LIS;2 9/9 2-JUN-1998 07:32:04 [GROUP,OWNER] (RWED,RWED,RWED,RE)", "DATA.DIR;1 1/9 2-JUN-1998 07:32:04 [GROUP,OWNER] (RWED,RWED,RWED,RE)",
Note: VMSFTPEntryParser can only be instantiated through the DefaultFTPParserFactory by classname. It will not be chosen by the autodetection scheme.
FTPFileEntryParser (for usage instructions)
,
DefaultFTPFileEntryParserFactory
Field Summary | |
private static java.lang.String |
MONTHS
months abbreviations looked for by this parser. |
private static java.lang.String |
REGEX
this is the regular expression used by this parser. |
Fields inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl |
_matcher_ |
Constructor Summary | |
VMSFTPEntryParser()
Constructor for a VMSFTPEntryParser object. |
Method Summary | |
protected boolean |
isVersioning()
|
FTPFile[] |
parseFileList(java.io.InputStream listStream)
Parses an FTP server file listing and converts it into a usable format in the form of an array of FTPFile instances. |
FTPFile |
parseFTPEntry(java.lang.String entry)
Parses a line of a VMS FTP server file listing and converts it into a usable format in the form of an FTPFile instance. |
java.lang.String |
readNextEntry(java.io.BufferedReader reader)
Reads the next entry using the supplied BufferedReader object up to whatever delemits one entry from the next. |
Methods inherited from class org.apache.commons.net.ftp.parser.RegexFTPFileEntryParserImpl |
getGroupCnt, getGroupsAsString, group, matches |
Methods inherited from class org.apache.commons.net.ftp.FTPFileEntryParserImpl |
preParse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String MONTHS
private static final java.lang.String REGEX
Constructor Detail |
public VMSFTPEntryParser()
java.lang.IllegalArgumentException
- Thrown if the regular expression is unparseable. Should not be seen
under normal conditions. It it is seen, this is a sign that
REGEX
is not a valid regular expression.Method Detail |
public FTPFile[] parseFileList(java.io.InputStream listStream) throws java.io.IOException
FTPFile
instances. If the
file list contains no files, null
should be
returned, otherwise an array of FTPFile
instances
representing the files in the directory is returned.
parseFileList
in interface FTPFileListParser
parseFileList
in class FTPFileEntryParserImpl
listStream
- The InputStream from which the file list should be
read.
java.io.IOException
- If an I/O error occurs reading the listStream.public FTPFile parseFTPEntry(java.lang.String entry)
FTPFile
instance. If the
file listing line doesn't describe a file, null
is
returned, otherwise a FTPFile
instance representing the
files in the directory is returned.
entry
- A line of text from the file listing
public java.lang.String readNextEntry(java.io.BufferedReader reader) throws java.io.IOException
readNextEntry
in interface FTPFileEntryParser
readNextEntry
in class FTPFileEntryParserImpl
reader
- The BufferedReader object from which entries are to be
read.
java.io.IOException
- thrown on any IO Error reading from the reader.protected boolean isVersioning()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |