Class LocalOptimizationUtil.TransferObjectJsonOutputStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.PipedOutputStream
-
- com.gc.iotools.stream.os.OutputStreamToInputStream<Object>
-
- org.technologybrewery.fermenter.stout.client.service.LocalOptimizationUtil.TransferObjectJsonOutputStream
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
- Enclosing class:
- LocalOptimizationUtil
public class LocalOptimizationUtil.TransferObjectJsonOutputStream extends com.gc.iotools.stream.os.OutputStreamToInputStream<Object>
Converts an OutputStream into an InputStream via an underlying Pipes implementation to prevent loading the entire object into memory for a TransferObject -> BusinessObject transformation. See EasyStream documentation for more (somewhat confusing) information (but better than doing it all by hand). Bottom line - this takes an InputStream of JSON representing a specific TransferObject and streams that into a specific BusinessObject. Super obvious, right?
-
-
Constructor Summary
Constructors Constructor Description TransferObjectJsonOutputStream(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends TransferObject> transferObjectClass)New instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectdoRead(InputStream istream)-
Methods inherited from class com.gc.iotools.stream.os.OutputStreamToInputStream
afterClose, close, close, flush, getResult, setDefaultPipeSize, write, write, write
-
Methods inherited from class java.io.PipedOutputStream
connect
-
Methods inherited from class java.io.OutputStream
nullOutputStream
-
-
-
-
Constructor Detail
-
TransferObjectJsonOutputStream
public TransferObjectJsonOutputStream(com.fasterxml.jackson.databind.ObjectMapper objectMapper, Class<? extends TransferObject> transferObjectClass)New instance.- Parameters:
objectMapper- ObjectMapper to perform the transformationtransferObjectClass- the specific TransferObject class being transformed
-
-
Method Detail
-
doRead
protected Object doRead(InputStream istream) throws Exception
-
-