Package com.nt.udc.io
Class CDataSink
java.lang.Object
com.nt.udc.io.CDataSink
- All Implemented Interfaces:
IDataSink
This class is used to write data into files in a specified output
directory.
- Since:
- JDK1.1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FilenameGeneratorThis member is used to generate filenamesprotected StringThis member is the output file prefix.protected StringThis member is the output file suffix.protected ILoggerThis member is used for reporting errors and warnings.protected StringThis member is the directory files are written to.protected DataOutputStreamThis member is the stream we output data to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringThis function is used to return a new filename unique to the current output directory.final voidsetFilenameGenerator(FilenameGenerator filenameGen) voidsetFilePrefix(String filePrefix) voidsetFileSuffix(String fileSuffix) booleanstart()This function is called to start writing.booleanstop()This function is called to stop writing.booleanThis function is called to write a string to the output medium.
-
Field Details
-
m_iLogger
This member is used for reporting errors and warnings. -
m_outputDir
This member is the directory files are written to. -
m_outputStream
This member is the stream we output data to. -
m_filePrefix
This member is the output file prefix. -
m_fileSuffix
This member is the output file suffix. -
m_filenameGen
This member is used to generate filenames
-
-
Constructor Details
-
CDataSink
-
-
Method Details
-
getOutputDir
-
getFilePrefix
-
getFileSuffix
-
setFilePrefix
-
setFileSuffix
-
setFilenameGenerator
-
writeData
This function is called to write a string to the output medium. -
start
public boolean start()This function is called to start writing. -
stop
public boolean stop()This function is called to stop writing. -
getNewFilename
This function is used to return a new filename unique to the current output directory.- Returns:
- true if successful, false otherwise
-