public class StreamWriter extends DataWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
StreamWriter.Format |
DataEndpoint.StatelastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYBUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
StreamWriter(File file) |
StreamWriter(OutputStream outputStream) |
StreamWriter(Writer writer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Indicates that this endpoint has finished reading or writing.
|
boolean |
getCloseStream() |
StreamWriter.Format |
getFormat() |
static StreamWriter |
newJsonSystemOutWriter()
Creates a new instance of StreamWriter writing JSON to System.out.
|
static StreamWriter |
newSystemErrWriter()
Creates a new instance of StreamWriter writing to System.err.
|
static StreamWriter |
newSystemOutWriter()
Creates a new instance of StreamWriter writing to System.out.
|
static StreamWriter |
newSystemOutWriterWithSessionProperties()
Creates a new instance of StreamWriter writing to System.out with all session properties.
|
static StreamWriter |
newXmlSystemOutWriter()
Creates a new instance of StreamWriter writing XML to System.out.
|
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).
|
StreamWriter |
setFormat(StreamWriter.Format format) |
protected void |
writeImpl(Record record)
Overridden by subclasses to write the specified record to this
DataWriter. |
addExceptionProperties, available, getNestedEndpoint, getNestedWriter, getRootEndpoint, getRootWriter, getWriter, writedecrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toStringaddElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescriptionpublic StreamWriter(File file) throws DataException
DataExceptionpublic StreamWriter(Writer writer)
public StreamWriter(OutputStream outputStream)
public static StreamWriter newSystemOutWriter()
public static StreamWriter newJsonSystemOutWriter()
public static StreamWriter newXmlSystemOutWriter()
public static StreamWriter newSystemErrWriter()
public static StreamWriter newSystemOutWriterWithSessionProperties()
public StreamWriter.Format getFormat()
public StreamWriter setFormat(StreamWriter.Format format)
public boolean getCloseStream()
public StreamWriter setCloseStream(boolean closeStream)
closeStream - public void open()
throws DataException
DataEndpointopen in class DataEndpointDataExceptionpublic void close()
throws DataException
DataEndpointclose in class DataEndpointDataExceptionprotected void writeImpl(Record record) throws Throwable
DataWriterDataWriter.writeImpl in class DataWriterThrowableCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.