Class 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 Detail

      • TransferObjectJsonOutputStream

        public TransferObjectJsonOutputStream​(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
                                              Class<? extends TransferObject> transferObjectClass)
        New instance.
        Parameters:
        objectMapper - ObjectMapper to perform the transformation
        transferObjectClass - the specific TransferObject class being transformed