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 FilenameGenerator
This member is used to generate filenamesprotected String
This member is the output file prefix.protected String
This member is the output file suffix.protected ILogger
This member is used for reporting errors and warnings.protected String
This member is the directory files are written to.protected DataOutputStream
This member is the stream we output data to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
This function is used to return a new filename unique to the current output directory.final void
setFilenameGenerator
(FilenameGenerator filenameGen) void
setFilePrefix
(String filePrefix) void
setFileSuffix
(String fileSuffix) boolean
start()
This function is called to start writing.boolean
stop()
This function is called to stop writing.boolean
This 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
-