directoryName. Also creates any necessary parent
- * directories that may not yet exist.
+ * This method creates a directory with the name directoryName.
+ * Also creates any necessary parent directories that may not yet exist.
*
- * If the directoryname is null or an empty string, a FileUtilException is thrown
+ * If the directoryname is null or an empty string, a FileUtilException is
+ * thrown
*
* @param directoryName
- * the name of the directory to create
- * @return boolean. Returns true if the directory is created and false otherwise
+ * the name of the directory to create
+ * @return boolean. Returns true if the directory is created and false
+ * otherwise
* @throws FileUtilException
- * if the directory name is null or an empty string
+ * if the directory name is null or an empty string
*/
public static boolean createDirectory(String directoryName) throws FileUtilException {
boolean isCreated = false;
@@ -239,19 +258,22 @@
}
/**
- * Creates a subdirectory under the parent directory parentDirName If the parent or child directory
- * is null, FileUtilException is thrown.
+ * Creates a subdirectory under the parent directory
+ * parentDirName If the parent or child directory is null,
+ * FileUtilException is thrown.
*
* If the parent directory has not been created yet, it will be created.
*
*
* @param parentDirName
- * The name of the parent directory in which the subdirectory should be created in
+ * The name of the parent directory in which the subdirectory
+ * should be created in
* @param subDirName
- * The name of the subdirectory to create
- * @return boolean. Returns true if the subdirectory was created and false otherwise
+ * The name of the subdirectory to create
+ * @return boolean. Returns true if the subdirectory was created and false
+ * otherwise
* @throws FileUtilException
- * if the parent/child directory name is null or empty.
+ * if the parent/child directory name is null or empty.
*/
public static boolean createDirectory(String parentDirName, String subDirName) throws FileUtilException {
boolean isSubDirCreated = false;
@@ -281,9 +303,10 @@
}
/**
- * If the directory name specified has a slash at the end of it such as "directoryName/", then the slash will be
- * removed and "directoryName" will be returned. The createDirectory(parentdir, childdir) method requires that there
- * is no slash at the end of the directory name.
+ * If the directory name specified has a slash at the end of it such as
+ * "directoryName/", then the slash will be removed and "directoryName" will
+ * be returned. The createDirectory(parentdir, childdir) method requires
+ * that there is no slash at the end of the directory name.
*
* @param stringToModify
* @return
@@ -297,8 +320,9 @@
* Checks to see if there is a slash at the end of the string.
*
* @param stringToCheck
- * the directoryName to check
- * @return boolean. Returns true if there is a slash at the end and false if not.
+ * the directoryName to check
+ * @return boolean. Returns true if there is a slash at the end and false if
+ * not.
*/
public static boolean trailingForwardSlashPresent(String stringToCheck) {
int indexOfSlash = stringToCheck.lastIndexOf("/");
@@ -341,20 +365,24 @@
}
/**
- * Dump some data to a file in the Dump Directory. The directory is set in the LAMS configuration file. These dumps
- * are primarily for support/debugging/problem reporting uses.
+ * Dump some data to a file in the Dump Directory. The directory is set in
+ * the LAMS configuration file. These dumps are primarily for
+ * support/debugging/problem reporting uses.
*
- * If the dump directory is not set, it will revert to the system temp directory.
+ * If the dump directory is not set, it will revert to the system temp
+ * directory.
*
- * Used by the FlashCrashDump servlet initially, may be used by other dump methods in future.
+ * Used by the FlashCrashDump servlet initially, may be used by other dump
+ * methods in future.
*
* @param data
- * data to dump
+ * data to dump
* @param id
- * some identification name for the string. Does not need to be unique. e.g. FLASH_jsmith
+ * some identification name for the string. Does not need to be
+ * unique. e.g. FLASH_jsmith
* @param extension
- * optional extension to be added to filename e.g. xml. Note: do not include the "." - that will be
- * added automatically.
+ * optional extension to be added to filename e.g. xml. Note: do
+ * not include the "." - that will be added automatically.
*
* @author Fiona Malikoff
* @throws FileUtilException
@@ -384,8 +412,9 @@
}
/**
- * get file name from a string which may include directory information. For example : "c:\\dir\\ndp\\pp.txt"; will
- * return pp.txt.? If file has no path infomation, then just return input fileName.
+ * get file name from a string which may include directory information. For
+ * example : "c:\\dir\\ndp\\pp.txt"; will return pp.txt.? If file has no
+ * path infomation, then just return input fileName.
*
*/
public static String getFileName(String fileName) {
@@ -409,7 +438,7 @@
* Get file directory info.
*
* @param fileName
- * with path info.
+ * with path info.
* @return return only path info with the given fileName
*/
public static String getFileDirectory(String fileName) {
@@ -431,11 +460,12 @@
}
/**
- * Merge two input parameter into full path and adjust File.separator to OS default separator as well.
+ * Merge two input parameter into full path and adjust File.separator to OS
+ * default separator as well.
*
* @param path
* @param file
- * could be file name,or sub directory path.
+ * could be file name,or sub directory path.
* @return
*/
public static String getFullPath(String path, String file) {
@@ -469,8 +499,8 @@
}
/**
- * get file extension name from a String, such as from "textabc.doc", return "doc" fileName also can contain
- * directory infomation.
+ * get file extension name from a String, such as from "textabc.doc", return
+ * "doc" fileName also can contain directory infomation.
*/
public static String getFileExtension(String fileName) {
if (fileName == null) {
@@ -486,8 +516,8 @@
}
/**
- * Check whether file is executable according to its extenstion and executable extension name list from LAMS
- * configuaration.
+ * Check whether file is executable according to its extenstion and
+ * executable extension name list from LAMS configuaration.
*
* @param filename
* @return
@@ -515,11 +545,14 @@
}
/**
- * Clean up any old directories in the java tmp directory, where the directory name starts with lamszip_ or lamstmp_
- * and is
* com.thoughtworks.xstream.converters.ConversionException: unknownField : unknownField
@@ -787,21 +823,24 @@
* Exports data in MS Excel (.xls) format.
*
* @param out
- * output stream to which the file written; usually taken from HTTP response; it is not closed
- * afterwards
+ * output stream to which the file written; usually taken from
+ * HTTP response; it is not closed afterwards
* @param sheetName
- * name of first sheet in Excel workbook; data will be stored in this sheet
+ * name of first sheet in Excel workbook; data will be stored in
+ * this sheet
* @param title
- * title printed in the first (0,0) cell
+ * title printed in the first (0,0) cell
* @param dateHeader
- * text describing current date; if NULL then no date is printed; if not
- * NULL then text is written out along with current date in the cell; the date is
- * formatted according to {@link #EXPORT_TO_SPREADSHEET_TITLE_DATE_FORMAT}
+ * text describing current date; if NULL then no
+ * date is printed; if not NULL then text is written
+ * out along with current date in the cell; the date is formatted
+ * according to {@link #EXPORT_TO_SPREADSHEET_TITLE_DATE_FORMAT}
* @param columnNames
- * name of the columns that describe data parameter
+ * name of the columns that describe data parameter
* @param data
- * array of data to print out; first index of array describes a row, second a column; dates are
- * formatted according to {@link #EXPORT_TO_SPREADSHEET_CELL_DATE_FORMAT}
+ * array of data to print out; first index of array describes a
+ * row, second a column; dates are formatted according to
+ * {@link #EXPORT_TO_SPREADSHEET_CELL_DATE_FORMAT}
* @throws IOException
* @throws JXLException
*/
@@ -861,22 +900,25 @@
}
/**
- * Exports data in CSV format. It uses UTF-8 character set and semicolon as separator.
+ * Exports data in CSV format. It uses UTF-8 character set and semicolon as
+ * separator.
*
* @param out
- * output stream to which the file written; usually taken from HTTP response; it is not closed
- * afterwards
+ * output stream to which the file written; usually taken from
+ * HTTP response; it is not closed afterwards
* @param title
- * title printed in the first (0,0) cell
+ * title printed in the first (0,0) cell
* @param dateHeader
- * text describing current date; if NULL then no date is printed; if not
- * NULL then text is written out along with current date in the cell; the date is
- * formatted according to {@link #EXPORT_TO_SPREADSHEET_TITLE_DATE_FORMAT}
+ * text describing current date; if NULL then no
+ * date is printed; if not NULL then text is written
+ * out along with current date in the cell; the date is formatted
+ * according to {@link #EXPORT_TO_SPREADSHEET_TITLE_DATE_FORMAT}
* @param columnNames
- * name of the columns that describe data parameter
+ * name of the columns that describe data parameter
* @param data
- * array of data to print out; first index of array describes a row, second a column; dates are
- * formatted according to {@link #EXPORT_TO_SPREADSHEET_CELL_DATE_FORMAT}
+ * array of data to print out; first index of array describes a
+ * row, second a column; dates are formatted according to
+ * {@link #EXPORT_TO_SPREADSHEET_CELL_DATE_FORMAT}
* @throws IOException
*/
public static void exportToolToCSV(OutputStream out, String title, String dateHeader, String[] columnNames,