org.apache.commons.net.ftp.parser
Class VMSFTPEntryParser
ConfigurableFTPFileEntryParserImpl
org.apache.commons.net.ftp.parser.VMSFTPEntryParser
public class VMSFTPEntryParser
extends ConfigurableFTPFileEntryParserImpl
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.
VMSFTPEntryParser() - Constructor for a VMSFTPEntryParser object.
|
VMSFTPEntryParser(FTPClientConfig config) - This constructor allows the creation of a VMSFTPEntryParser object with
something other than the default configuration.
|
protected @Override | FTPClientConfig getDefaultConfiguration() - Defines a default configuration to be used when this class is
instantiated without a
FTPClientConfig
parameter being specified.
|
@Override | String readNextEntry(BufferedReader reader) - Reads the next entry using the supplied BufferedReader object up to
whatever delemits one entry from the next.
|
protected boolean | isVersioning()
|
FTPFile | parseFTPEntry(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.
|
FTPFile[] | parseFileList(InputStream listStream) -
Parses an FTP server file listing and converts it into a usable format
in the form of an array of
FTPFile instances.
|
VMSFTPEntryParser
public VMSFTPEntryParser()
Constructor for a VMSFTPEntryParser object.
VMSFTPEntryParser
public VMSFTPEntryParser(FTPClientConfig config)
This constructor allows the creation of a VMSFTPEntryParser object with
something other than the default configuration.
config
- The configuration
object used to
configure this parser.
FTPClientConfig getDefaultConfiguration
protected @Override FTPClientConfig getDefaultConfiguration()
Defines a default configuration to be used when this class is
instantiated without a FTPClientConfig
parameter being specified.
- the default configuration for this parser.
String readNextEntry
public @Override String readNextEntry(BufferedReader reader)
throws IOException
Reads the next entry using the supplied BufferedReader object up to
whatever delemits one entry from the next. This parser cannot use
the default implementation of simply calling BufferedReader.readLine(),
because one entry may span multiple lines.
reader
- The BufferedReader object from which entries are to be
read.
- A string representing the next ftp entry or null if none found.
isVersioning
protected boolean isVersioning()
parseFTPEntry
public FTPFile parseFTPEntry(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. 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
- An FTPFile instance corresponding to the supplied entry
parseFileList
public FTPFile[] parseFileList(InputStream listStream)
throws IOException
Parses an FTP server file listing and converts it into a usable format
in the form of an array of
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.
listStream
- The InputStream from which the file list should be
read.
- The list of file information contained in the given path. null
if the list could not be obtained or if there are no files in
the directory.