Package nl.nn.adapterframework.stream
Class JsonEventHandlerOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.PipedOutputStream
-
- nl.nn.adapterframework.stream.JsonEventHandlerOutputStream
-
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
,Thread.UncaughtExceptionHandler
public class JsonEventHandlerOutputStream extends PipedOutputStream implements Thread.UncaughtExceptionHandler
Helper class to convert character or byte based OutputStreams into a JSON SAX event stream. Uses OS pipes to convert an OutputStream into an InputStream- Author:
- Gerrit van Brakel
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
log
-
Constructor Summary
Constructors Constructor Description JsonEventHandlerOutputStream(JsonEventHandler handler, ThreadConnector threadConnector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Throwable
getException()
void
setException(Throwable exception)
void
uncaughtException(Thread arg0, Throwable t)
-
Methods inherited from class java.io.PipedOutputStream
connect, flush, write, write
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
JsonEventHandlerOutputStream
public JsonEventHandlerOutputStream(JsonEventHandler handler, ThreadConnector threadConnector) throws StreamingException
- Throws:
StreamingException
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPipedOutputStream
- Throws:
IOException
-
uncaughtException
public void uncaughtException(Thread arg0, Throwable t)
- Specified by:
uncaughtException
in interfaceThread.UncaughtExceptionHandler
-
setException
public void setException(Throwable exception)
-
getException
public Throwable getException()
-
-