Interface MessageWriter<H extends Header,S extends Segment<?,?>,F extends NdmConstituent<H,S>>
-
- Type Parameters:
H
- type of the headerS
- type of the segmentsF
- type of the file
- All Known Implementing Classes:
AbstractMessageWriter
,AcmWriter
,AemWriter
,ApmWriter
,CdmMessageWriter
,CdmWriter
,OcmWriter
,OemWriter
,OmmWriter
,OpmWriter
,TdmWriter
public interface MessageWriter<H extends Header,S extends Segment<?,?>,F extends NdmConstituent<H,S>>
Interface for writing Navigation Data Message (NDM) files.- Since:
- 11.0
- Author:
- Luc Maisonobe
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getFormatVersionKey()
Get key for format version.String
getRoot()
Get root element for XML files.double
getVersion()
Get current format version.void
writeFooter(Generator generator)
Write footer for the file.void
writeHeader(Generator generator, H header)
Write header for the file.default void
writeMessage(Generator generator, F message)
Write one complete message.void
writeSegment(Generator generator, S segment)
Write one segment.
-
-
-
Method Detail
-
writeMessage
default void writeMessage(Generator generator, F 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
-
writeHeader
void writeHeader(Generator generator, H header) throws IOException
Write header for the file.- Parameters:
generator
- generator to use for producing outputheader
- header to write (creation date and originator will be added if missing)- Throws:
IOException
- if the stream cannot write to stream
-
writeSegment
void writeSegment(Generator generator, S segment) throws IOException
Write one segment.- Parameters:
generator
- generator to use for producing outputsegment
- segment to write- Throws:
IOException
- if any buffer writing operations fails
-
writeFooter
void writeFooter(Generator generator) throws IOException
Write footer for the file.- Parameters:
generator
- generator to use for producing output- Throws:
IOException
- if the stream cannot write to stream
-
getRoot
String getRoot()
Get root element for XML files.- Returns:
- root element for XML files
- Since:
- 12.0
-
getFormatVersionKey
String getFormatVersionKey()
Get key for format version.- Returns:
- key for format version
- Since:
- 12.0
-
getVersion
double getVersion()
Get current format version.- Returns:
- current format version
- Since:
- 12.0
-
-