Class VMSFTPEntryParser

    • Constructor Detail

      • VMSFTPEntryParser

        public VMSFTPEntryParser()
        Constructor for a VMSFTPEntryParser object.
        Throws:
        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.
      • VMSFTPEntryParser

        public VMSFTPEntryParser​(FTPClientConfig config)
        This constructor allows the creation of a VMSFTPEntryParser object with something other than the default configuration.
        Parameters:
        config - The configuration object used to configure this parser.
        Throws:
        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.
        Since:
        1.4
    • Method Detail

      • parseFTPEntry

        public 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. 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.
        Parameters:
        entry - A line of text from the file listing
        Returns:
        An FTPFile instance corresponding to the supplied entry
      • readNextEntry

        public java.lang.String readNextEntry​(java.io.BufferedReader reader)
                                       throws java.io.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.
        Specified by:
        readNextEntry in interface FTPFileEntryParser
        Overrides:
        readNextEntry in class FTPFileEntryParserImpl
        Parameters:
        reader - The BufferedReader object from which entries are to be read.
        Returns:
        A string representing the next ftp entry or null if none found.
        Throws:
        java.io.IOException - thrown on any IO Error reading from the reader.
      • isVersioning

        protected boolean isVersioning()
      • parseFileList

        @Deprecated
        public FTPFile[] parseFileList​(java.io.InputStream listStream)
                                throws java.io.IOException
        Deprecated.
        (2.2) No other FTPFileEntryParser implementations have this method.
        DO NOT USE
        Parameters:
        listStream - the stream
        Returns:
        the array of files
        Throws:
        java.io.IOException - on error