org.audit4j.core.exception.Audit4jRuntimeException Java Examples
The following examples show how to use
org.audit4j.core.exception.Audit4jRuntimeException.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: FTPArchiveJob.java From audit4j-core with Apache License 2.0 | 5 votes |
@Override void archive() { FTPArchiveClient client = new FTPArchiveClient(); try { client.init(clientArguments); } catch (UnknownHostException e) { throw new Audit4jRuntimeException("Excepting in running archive client.", e); } }
Example #2
Source File: AbstractArchiveJob.java From audit4j-core with Apache License 2.0 | 5 votes |
/** * File created date. * * @param fileName the file name * @return the date */ private Date fileCreatedDate(String fileName) { String[] splittedWithoutExtention = fileName.split("."); String fileNameWithoutExtention = splittedWithoutExtention[0]; String[] splittedWithoutPrefix = fileNameWithoutExtention.split("-"); String fileNameDateInStr = splittedWithoutPrefix[1]; try { return AuditUtil.stringTodate(fileNameDateInStr, "yyyy-MM-dd"); } catch (ParseException e) { throw new Audit4jRuntimeException("Exception occured parsing the date.", e); } }