Package com.nt.udc.oi.node.geneva
Class GenevaBasicMetaWriter
java.lang.Object
com.nt.udc.oi.node.geneva.GenevaBasicMetaWriter
- All Implemented Interfaces:
GenevaMetaWriter
,StateBufferSaveable
-
Constructor Summary
ConstructorsConstructorDescriptionGenevaBasicMetaWriter
(OIFileWriter oiWriter, LoggerIfc loggerIfc) GenevaBasicMetaWriter
(Writer writer, LoggerIfc logger) -
Method Summary
Modifier and TypeMethodDescriptionint
get the number of characters writtengets the checksumint
getLines()
get number of lines written using the writeln methodgets the security checksumvoid
reset()
resets the line count, character count, checksum and security checksumvoid
restoreState
(StateBuffer buffer) This function is used to restore the writer's state based on information read from a StateBuffer.void
saveState
(StateBuffer buffer) This function is used to store state (recovery) information into a buffer managed by the caller.void
writes out a line of date increments/updates line, character, checksum, security checksumvoid
writelnNoInc
(String data) writes out a line does NOT imcrement/update lines, characters, checksum, security checksum use this in after the end footer
-
Constructor Details
-
GenevaBasicMetaWriter
-
GenevaBasicMetaWriter
-
-
Method Details
-
reset
public void reset()resets the line count, character count, checksum and security checksum- Specified by:
reset
in interfaceGenevaMetaWriter
-
writeln
writes out a line of date increments/updates line, character, checksum, security checksum- Specified by:
writeln
in interfaceGenevaMetaWriter
- Parameters:
data
- String to write out data
-
writelnNoInc
writes out a line does NOT imcrement/update lines, characters, checksum, security checksum use this in after the end footer- Specified by:
writelnNoInc
in interfaceGenevaMetaWriter
- Parameters:
data
- String to write out
-
getLines
public int getLines()get number of lines written using the writeln method- Specified by:
getLines
in interfaceGenevaMetaWriter
- Returns:
- number of lines written
-
getCharacters
public int getCharacters()get the number of characters written- Specified by:
getCharacters
in interfaceGenevaMetaWriter
- Returns:
- number of characters written
-
getChecksum
gets the checksum- Specified by:
getChecksum
in interfaceGenevaMetaWriter
- Returns:
- empty string
-
getSecurityChecksum
gets the security checksum- Specified by:
getSecurityChecksum
in interfaceGenevaMetaWriter
- Returns:
- sempty string
-
saveState
This function is used to store state (recovery) information into a buffer managed by the caller.Context information saved:
- line count
- character count
- Specified by:
saveState
in interfaceStateBufferSaveable
- Parameters:
buffer
- Buffer used to store recovery information
-
restoreState
This function is used to restore the writer's state based on information read from a StateBuffer.- Specified by:
restoreState
in interfaceStateBufferSaveable
- Parameters:
buffer
- Buffer to read recovery information from- Throws:
StateException
-