cdac.medinfo.sdk.hl7282.hl7streams

## Class HL7BufferStream

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.hl7streams.HL7Stream
  - - cdac.medinfo.sdk.hl7282.hl7streams.HL7BufferStream

- All Implemented Interfaces:
    IHL7Stream

      public class HL7BufferStream
      extends HL7Stream

  This class is specialized in the reading/writing operations on the byte array

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HL7BufferStream()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `setBufferStream(java.io.ByteArrayInputStream objByteArrayInputStream, java.io.ByteArrayOutputStream objByteArrayOutputStream)` Sets ByteArrayStreams to BufferStream.
    `int` | `setInputStream(java.io.ByteArrayInputStream objByteArrayInputStream)` Sets the ByteArrayInputStream to BufferStream.
    `int` | `setOutputStream(java.io.ByteArrayOutputStream objByteArrayOutputStream)` Sets the ByteArrayOutputStream to BufferStream.
    `byte[]` | `toByteArray()` Retrieves the internal buffer of the ByteArrayOutputStream.

    - ### Methods inherited from class cdac.medinfo.sdk.hl7282.hl7streams.HL7Stream

      `available, close, endSend, getReadBytes, getStream, mark, readBuffer, readByte, readChar, readString, reset, skip, startReceive, writeBuffer, writeByte, writeChar, writeString`

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

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

- - ### Constructor Detail

    - #### HL7BufferStream

          public HL7BufferStream()

  - ### Method Detail

    - #### setInputStream

          public int setInputStream(java.io.ByteArrayInputStream objByteArrayInputStream)

      Sets the ByteArrayInputStream to BufferStream.
      Parameters:
        `objByteArrayInputStream` - object of ByteArrayInputStream
      Returns:
        int - Success or Failure.

    - #### setOutputStream

          public int setOutputStream(java.io.ByteArrayOutputStream objByteArrayOutputStream)

      Sets the ByteArrayOutputStream to BufferStream.
      Parameters:
        `objByteArrayOutputStream` - object of ByteArrayOutputStream
      Returns:
        int - Succes or Failure.

    - #### setBufferStream

          public int setBufferStream(java.io.ByteArrayInputStream objByteArrayInputStream,
                            java.io.ByteArrayOutputStream objByteArrayOutputStream)

      Sets ByteArrayStreams to BufferStream.
      Parameters:
        `objByteArrayInputStream` - object of ByteArrayInputStream
        `objByteArrayOutputStream` - object of ByteArrayOutputStream
      Returns:
        int - Success or Failure.

    - #### toByteArray

          public byte[] toByteArray()

      Retrieves the internal buffer of the ByteArrayOutputStream.
      Returns:
        byte[] - byte array of buffer