Class VMSFileParser

java.lang.Object
com.enterprisedt.net.ftp.FTPFileParser
com.enterprisedt.net.ftp.VMSFileParser

public class VMSFileParser extends FTPFileParser
Represents a remote OpenVMS file parser. Thanks to Jason Schultz for contributing significantly to this class
Version:
$Revision$
Author:
Bruce Blackshaw
  • Field Details

    • cvsId

      public static String cvsId
      Revision control id
  • Constructor Details

    • VMSFileParser

      public VMSFileParser()
      Constructor
  • Method Details

    • isMultiLine

      public boolean isMultiLine()
      Does this parser parse multiple lines to get one listing?
      Overrides:
      isMultiLine in class FTPFileParser
      Returns:
    • getBlocksize

      public int getBlocksize()
      Get the VMS blocksize, used for calculating file sizes
      Returns:
      blocksize
    • setBlocksize

      public void setBlocksize(int blocksize)
      Set the VMS blocksize, used for calculating file sizes. This might need to be changed if unexpected file sizes are being returned for VMS files.
      Parameters:
      blocksize - new blocksize
    • isVersionInName

      public boolean isVersionInName()
      Get the property that controls whether or not the version number is returned as part of the filename, e.g. FILENAME.TXT;2 would be returned as is if this property is true, or FILENAME.TXT if it is false.
      Returns:
      true if version to be returned as part of the filename
    • setVersionInName

      public void setVersionInName(boolean versionInName)
      Set the property that controls whether or not the version number is returned as part of the filename, e.g. FILENAME.TXT;2 would be returned as is if this property is true, or FILENAME.TXT if it is false.
      Parameters:
      versionInName - true if version to be returned as part of the filename
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isValidFormat

      public boolean isValidFormat(String[] listing)
      Valid format for this parser
      Overrides:
      isValidFormat in class FTPFileParser
      Parameters:
      listing -
      Returns:
      true if valid
    • parse

      public FTPFile parse(String raw) throws ParseException
      Parse server supplied string OUTPUT: Directory used/allocated dd-MMM-yyyy HH:mm:ss [unknown] (PERMS) used/allocated dd-MMM-yyyy HH:mm:ss [unknown] (PERMS) ... Total of invalid input: '<'> files, invalid input: '<'>/invalid input: '<'> blocks
      Specified by:
      parse in class FTPFileParser
      Parameters:
      raw - raw string to parse
      Throws:
      ParseException
    • setLocale

      public void setLocale(Locale locale)
      Description copied from class: FTPFileParser
      Set the locale for date parsing of listings
      Specified by:
      setLocale in class FTPFileParser
      Parameters:
      locale - locale to set