com.northconcepts.datapipeline.core
Class StreamWriter
java.lang.Object
com.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataWriter
com.northconcepts.datapipeline.core.StreamWriter
public class StreamWriter
- extends DataWriter
Writes records to a stream in a human-readable format.
|
Method Summary |
void |
close()
Indicates that this endpoint has finished reading or writing. |
boolean |
getCloseStream()
|
void |
open()
Makes this endpoint ready for reading or writing. |
StreamWriter |
setCloseStream(boolean closeStream)
Specifies if the stream should be closed when this writer is closed (default is false). |
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this DataWriter. |
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getDescription, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, setDescription, toString |
StreamWriter
public StreamWriter(File file)
throws DataException
- Throws:
DataException
StreamWriter
public StreamWriter(Writer writer)
StreamWriter
public StreamWriter(OutputStream outputStream)
getCloseStream
public boolean getCloseStream()
setCloseStream
public StreamWriter setCloseStream(boolean closeStream)
- Specifies if the stream should be closed when this writer is closed (default is false).
- Parameters:
closeStream -
- Returns:
- this writer
open
public void open()
throws DataException
- Description copied from class:
DataEndpoint
- Makes this endpoint ready for reading or writing.
- Overrides:
open in class DataEndpoint
- Throws:
DataException
close
public void close()
throws DataException
- Description copied from class:
DataEndpoint
- Indicates that this endpoint has finished reading or writing.
- Overrides:
close in class DataEndpoint
- Throws:
DataException
writeImpl
protected void writeImpl(Record record)
throws Throwable
- Description copied from class:
DataWriter
- Overridden by subclasses to write the specified record to this
DataWriter.
- Specified by:
writeImpl in class DataWriter
- Throws:
Throwable
Copyright (c) 2007-2012 North Concepts Inc. All Rights Reserved.