Class JacksonStreamSink
- java.lang.Object
-
- io.wcm.caravan.io.jsontransform.sink.JacksonStreamSink
-
- All Implemented Interfaces:
Sink
,Closeable
,AutoCloseable
@ProviderType public final class JacksonStreamSink extends Object implements Sink
Writes the JSON stream elements into an output stream.
-
-
Constructor Summary
Constructors Constructor Description JacksonStreamSink(OutputStream output)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
hasOutput()
void
write(JsonElement jsonElement)
Takes an JSON element and writes it some where in any format.
-
-
-
Constructor Detail
-
JacksonStreamSink
public JacksonStreamSink(OutputStream output) throws IOException
- Parameters:
output
- The output stream to write into- Throws:
IOException
- Error on writing
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
write
public void write(JsonElement jsonElement) throws IOException
Description copied from interface:Sink
Takes an JSON element and writes it some where in any format.- Specified by:
write
in interfaceSink
- Parameters:
jsonElement
- JSON element- Throws:
IOException
- Writing error
-
-