Package com.enterprisedt.net.ftp
Class VMSFileParser
java.lang.Object
com.enterprisedt.net.ftp.FTPFileParser
com.enterprisedt.net.ftp.VMSFileParser
Represents a remote OpenVMS file parser. Thanks to Jason Schultz for contributing
significantly to this class
- Version:
- $Revision$
- Author:
- Bruce Blackshaw
-
Field Summary
FieldsFields inherited from class com.enterprisedt.net.ftp.FTPFileParser
ignoreDateParseErrors -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the VMS blocksize, used for calculating file sizesbooleanDoes this parser parse multiple lines to get one listing?booleanisValidFormat(String[] listing) Valid format for this parserbooleanGet the property that controls whether or not the version number is returned as part of the filename, e.g.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) ... voidsetBlocksize(int blocksize) Set the VMS blocksize, used for calculating file sizes.voidSet the locale for date parsing of listingsvoidsetVersionInName(boolean versionInName) Set the property that controls whether or not the version number is returned as part of the filename, e.g.toString()Methods inherited from class com.enterprisedt.net.ftp.FTPFileParser
setIgnoreDateParseErrors, split, split, split, trimStart
-
Field Details
-
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:
isMultiLinein classFTPFileParser- 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
-
isValidFormat
Valid format for this parser- Overrides:
isValidFormatin classFTPFileParser- Parameters:
listing-- Returns:
- true if valid
-
parse
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:
parsein classFTPFileParser- Parameters:
raw- raw string to parse- Throws:
ParseException
-
setLocale
Description copied from class:FTPFileParserSet the locale for date parsing of listings- Specified by:
setLocalein classFTPFileParser- Parameters:
locale- locale to set
-