be.fgov.ehealth.etee.crypto.utils

## Class DataPipeInMemory

- java.lang.Object
- - be.fgov.ehealth.etee.crypto.utils.DataPipeInMemory

- All Implemented Interfaces:
    DataPipe, java.io.Closeable, java.lang.AutoCloseable

      public class DataPipeInMemory
      extends java.lang.Object
      implements DataPipe

  DataPipe using an in memory mechanism to push all the incoming data to an inputstream once the getFrom() method is called.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataPipeInMemory(int buffer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `java.io.InputStream` | `getFrom()` Reads data from the pipe.
    `java.io.OutputStream` | `getTo()` Adds data to the pipe.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataPipeInMemory

          public DataPipeInMemory(int buffer)

      Parameters:
        `buffer` - initial capacity of the buffer

  - ### Method Detail

    - #### getFrom

          public java.io.InputStream getFrom()

      Description copied from interface: `DataPipe`
      Reads data from the pipe.
      Specified by:
        `getFrom` in interface `DataPipe`
      Returns:
        the stream to read from the pipe

    - #### getTo

          public java.io.OutputStream getTo()

      Description copied from interface: `DataPipe`
      Adds data to the pipe.
      Specified by:
        `getTo` in interface `DataPipe`
      Returns:
        the stream to write to the pipe

    - #### close

          public void close()

      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

Copyright © 2021 eHealth. All rights reserved.