Package org.dspace.curate
Class FileReporter
- java.lang.Object
-
- org.dspace.curate.FileReporter
-
- All Implemented Interfaces:
Appendable,AutoCloseable,Reporter
public class FileReporter extends Object implements Reporter
Save a curation report to a unique file in the reports directory. Reports are named by the date and time of day, for example: "curation-20180916T113903045.report".- Author:
- mhwood
-
-
Constructor Summary
Constructors Constructor Description FileReporter()Open a writer to a file in a directory named by the configuration propertyreport.dir, or in[DSpace]/reportsif not configured.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Appendableappend(char c)Appendableappend(CharSequence cs)Appendableappend(CharSequence cs, int i, int i1)voidclose()
-
-
-
Constructor Detail
-
FileReporter
public FileReporter() throws IOExceptionOpen a writer to a file in a directory named by the configuration propertyreport.dir, or in[DSpace]/reportsif not configured.- Throws:
IOException- if there is a problem with the file path.
-
-
Method Detail
-
append
public Appendable append(CharSequence cs) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public Appendable append(CharSequence cs, int i, int i1) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
append
public Appendable append(char c) throws IOException
- Specified by:
appendin interfaceAppendable- Throws:
IOException
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-