Package cdc.issues.io
Class IssuesIoFactory
java.lang.Object
cdc.issues.io.IssuesIoFactory
Class that can be used to create instances of:
- Author:
- Damien Carbonne
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanExportTo(File file) booleancanImportFrom(File file) createIssuesReader(File file) Creates an IssuesReader fitted for a file.createIssuesReader(InputStream in, IssuesFormat format) Creates an IssuesReader fitted for an input stream and a format.createIssuesStreamWriter(File file, OutSettings settings) Creates an instance ofIssuesStreamWriterfitted for a file.createIssuesStreamWriter(OutputStream out, IssuesFormat format, OutSettings settings) Creates an instance ofIssuesStreamWriterfitted for an output stream and a format.createIssuesWriter(File file) Creates an IssuesWriter fitted for a file.createIssuesWriter(OutputStream out, IssuesFormat format) Creates an IssuesWriter fitted for an output stream and a format.
-
Constructor Details
-
IssuesIoFactory
Creates a factory.- Parameters:
features- The features.
-
-
Method Details
-
getFeatures
- Returns:
- The features associated to this factory.;
-
canExportTo
- Parameters:
file- The file.- Returns:
trueif export tofileis supported. Iffileisnullreturnsfalse.
-
createIssuesStreamWriter
Creates an instance ofIssuesStreamWriterfitted for a file.- Parameters:
file- The file for which the writer must be created.settings- The settings.- Returns:
- A new instance of
IssuesStreamWriterfitted forfile. - Throws:
IllegalArgumentException- Whenfileorsettingsisnull,* or whenfilehas an unrecognized extension.
-
createIssuesStreamWriter
public IssuesStreamWriter createIssuesStreamWriter(OutputStream out, IssuesFormat format, OutSettings settings) Creates an instance ofIssuesStreamWriterfitted for an output stream and a format.- Parameters:
out- The output stream.format- The format.settings- The settings.- Returns:
- A new instance of
IssuesStreamWriterfitted foroutandformat. - Throws:
IllegalArgumentException- Whenout,formatorsettingsisnull.
-
createIssuesWriter
Creates an IssuesWriter fitted for a file.See
IssuesFormatfor a list of supported formats.- Parameters:
file- The file for which an IssuesWriter must be created.- Returns:
- A new instance of
IssuesWriterfitted forfile. - Throws:
IllegalArgumentException- Whenfileisnullor has an unrecognized extension.
-
createIssuesWriter
Creates an IssuesWriter fitted for an output stream and a format.- Parameters:
out- The output stream.format- The format.- Returns:
- A new instance of
IssuesWriterfitted foroutandformat. - Throws:
IllegalArgumentException- Whenoutorformatisnull.
-
canImportFrom
- Parameters:
file- The file.- Returns:
trueif import fromfileis supported. Iffileisnullreturnsfalse.
-
createIssuesReader
Creates an IssuesReader fitted for a file.- Parameters:
file- The file.- Returns:
- A new instance of
IssuesReaderfitted forfile. - Throws:
IllegalArgumentException- Whenfileisnull, or whenfilehas an unrecognized extension.
-
createIssuesReader
Creates an IssuesReader fitted for an input stream and a format.- Parameters:
in- The input stream.format- The format.- Returns:
- A new instance of
IssuesReaderfitted forinandformat. - Throws:
IllegalArgumentException- Wheninorformatisnull.
-