Package de.isas.mztab2.io
Class MzTabNonValidatingWriter
- java.lang.Object
-
- de.isas.mztab2.io.MzTabNonValidatingWriter
-
- All Implemented Interfaces:
MzTabWriter<Void>
public class MzTabNonValidatingWriter extends Object implements MzTabWriter<Void>
MzTabNonValidatingWriter allows to write MzTab objects without additional validation checks. Use this if you are sure that your object structure conforms to the mzTab constraints. Otherwise, use the MzTabValidatingWriter.
To create a non-validating instance, call:
MzTabWriter plainWriter = new MzTabNonValidatingWriter();
To create a validating writer using the default checks also applied by the parser, call:
MzTabWriter validatingWriter = new MzTabValidatingWriter.Default();
- Author:
- nilshoffmann
- See Also:
MzTabValidatingWriter
-
-
Constructor Summary
Constructors Constructor Description MzTabNonValidatingWriter()
MzTabNonValidatingWriter(MzTabWriterDefaults writerDefaults)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Void>
write(OutputStreamWriter writer, MzTab mzTab)
Write the mzTab object to the provided output stream writer.Optional<Void>
write(Path path, MzTab mzTab)
Write the mzTab object to the provided path.
-
-
-
Constructor Detail
-
MzTabNonValidatingWriter
public MzTabNonValidatingWriter()
-
MzTabNonValidatingWriter
public MzTabNonValidatingWriter(MzTabWriterDefaults writerDefaults)
-
-
Method Detail
-
write
public Optional<Void> write(OutputStreamWriter writer, MzTab mzTab) throws IOException
Write the mzTab object to the provided output stream writer.
This method does not close the output stream but will issue aflush
on the provided output stream writer!- Specified by:
write
in interfaceMzTabWriter<Void>
- Parameters:
writer
- aOutputStreamWriter
object.mzTab
- aMzTab
object.- Returns:
- the optional payload.
- Throws:
IOException
- if any.
-
write
public Optional<Void> write(Path path, MzTab mzTab) throws IOException
Write the mzTab object to the provided path.
- Specified by:
write
in interfaceMzTabWriter<Void>
- Parameters:
path
- aPath
object.mzTab
- aMzTab
object.- Returns:
- the validation messages.
- Throws:
IOException
- if any.
-
-