Package org.orekit.files.ccsds.ndm
Class NdmWriter
- java.lang.Object
-
- org.orekit.files.ccsds.ndm.NdmWriter
-
public class NdmWriter extends Object
Writer for CCSDS Navigation Data Message.- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description NdmWriter(WriterBuilder builder)Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidwriteComment(Generator generator, String comment)Write a comment line.<H extends Header,S extends Segment<?,?>,F extends NdmConstituent<H,S>>
voidwriteConstituent(Generator generator, F constituent)Write a constituent.voidwriteMessage(Generator generator, Ndm message)Write one complete message.
-
-
-
Constructor Detail
-
NdmWriter
public NdmWriter(WriterBuilder builder)
Simple constructor.Calling this constructor directly is not recommended. Users should rather use
WriterBuilder.buildNdmWriter().- Parameters:
builder- builder for the constituents parsers
-
-
Method Detail
-
writeMessage
public void writeMessage(Generator generator, Ndm message) throws IOException
Write one complete message.- Parameters:
generator- generator to use for producing outputmessage- message to write- Throws:
IOException- if the stream cannot write to stream
-
writeComment
public void writeComment(Generator generator, String comment) throws IOException
Write a comment line.Comments allows comments only before constituents, so attempting to add comments after the first constituent has been written will produce an exception.
- Parameters:
generator- generator to use for producing outputcomment- comment line to write- Throws:
IOException- if the stream cannot write to stream
-
writeConstituent
public <H extends Header,S extends Segment<?,?>,F extends NdmConstituent<H,S>> void writeConstituent(Generator generator, F constituent) throws IOException
Write a constituent.- Type Parameters:
H- type of the headerS- type of the segmentsF- type of the file- Parameters:
generator- generator to use for producing outputconstituent- constituent- Throws:
IOException- if the stream cannot write to stream
-
-