cdac.medinfo.sdk.hl7282.hl7net.commons

## Class StandardUtilityMethods

- java.lang.Object
- - cdac.medinfo.sdk.hl7282.hl7net.commons.StandardUtilityMethods

-     public class StandardUtilityMethods
      extends java.lang.Object

  This class contains some general purpose methods used in the project.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardUtilityMethods()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `createReplicateStream(IHL7Stream objHL7BufferStream, byte[] readBytes)` This method takes object of HL7buffer stream and returns out the byteArrayInputStream by making replica of received stream.
    `static java.lang.String` | `getControlID(byte[] buffer)`
    `static Segment` | `getMessageBatchHeader(IHL7Stream objHL7BufferStream)`

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

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

- - ### Constructor Detail

    - #### StandardUtilityMethods

          public StandardUtilityMethods()

  - ### Method Detail

    - #### getControlID

          public static java.lang.String getControlID(byte[] buffer)
                                               throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getMessageBatchHeader

          public static Segment getMessageBatchHeader(IHL7Stream objHL7BufferStream)
                                               throws java.io.IOException,
                                                      ParseException

      Parameters:
        `objHL7BufferStream` - Object of HL7Stream class.
      Returns:
        Segment of Type MSH,FHS,BHS.
      Throws:
        `java.io.IOException` - When IOexception fails.
        `ParseException` - when Processing of Stream Fails.

    - #### createReplicateStream

          public static byte[] createReplicateStream(IHL7Stream objHL7BufferStream,
                                     byte[] readBytes)

      This method takes object of HL7buffer stream and returns out the byteArrayInputStream by making replica of received stream.
      Parameters:
        `objHL7BufferStream` - - object of HL7BufferStream
        `byte[]` - for the received Buffer.
      Returns:
        byte[] - array of read bytes.