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 TypeMethodDescriptionintget the number of characters writtengets the checksumintgetLines()get number of lines written using the writeln methodgets the security checksumvoidreset()resets the line count, character count, checksum and security checksumvoidrestoreState(StateBuffer buffer) This function is used to restore the writer's state based on information read from a StateBuffer.voidsaveState(StateBuffer buffer) This function is used to store state (recovery) information into a buffer managed by the caller.voidwrites out a line of date increments/updates line, character, checksum, security checksumvoidwritelnNoInc(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:
resetin interfaceGenevaMetaWriter
-
writeln
writes out a line of date increments/updates line, character, checksum, security checksum- Specified by:
writelnin 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:
writelnNoIncin interfaceGenevaMetaWriter- Parameters:
data- String to write out
-
getLines
public int getLines()get number of lines written using the writeln method- Specified by:
getLinesin interfaceGenevaMetaWriter- Returns:
- number of lines written
-
getCharacters
public int getCharacters()get the number of characters written- Specified by:
getCharactersin interfaceGenevaMetaWriter- Returns:
- number of characters written
-
getChecksum
gets the checksum- Specified by:
getChecksumin interfaceGenevaMetaWriter- Returns:
- empty string
-
getSecurityChecksum
gets the security checksum- Specified by:
getSecurityChecksumin 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:
saveStatein 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:
restoreStatein interfaceStateBufferSaveable- Parameters:
buffer- Buffer to read recovery information from- Throws:
StateException
-