cdac.medinfo.sdk.hl7282.hl7net.commons

## Interface IFragmentProcessor

- All Known Implementing Classes:
    FragmentAgent

      public interface IFragmentProcessor

  The IFragmentProcessor interface should be implemented by any class whose instances are intended to perform the fragmentation and defragmentation for HL7 messages. The class must define the fragment and defragment methods to fragment and reassembling the fragments.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HL7BufferStream` | `defragment(HL7BufferStream objHL7BufferStream)` Defragments The HL7BufferStream and returns Defragmented HL7BufferStream.
    `ISingleCollection<HL7BufferStream>` | `fragment(HL7BufferStream objHL7BufferStream)` Fragments The HL7BufferStream and returns Fragmented HL7BufferStream.
    `void` | `setMaxLength(int iLength)` Sets maximum length for fragments.

- - ### Method Detail

    - #### fragment

          ISingleCollection<HL7BufferStream> fragment(HL7BufferStream objHL7BufferStream)
                                                      throws java.io.IOException

      Fragments The HL7BufferStream and returns Fragmented HL7BufferStream. It adds required segments in fragments specified by HL7 standard.
      Parameters:
        `objHL7BufferStream` - - HL7BufferStream to fragment.
      Returns:
        ISingleCollection<HL7BufferStream> - Collection of Fragmented HL7BufferStream.
      Throws:
        `java.io.IOException` - Thrown when IO operation fails.

    - #### defragment

          HL7BufferStream defragment(HL7BufferStream objHL7BufferStream)
                                     throws java.io.IOException

      Defragments The HL7BufferStream and returns Defragmented HL7BufferStream. Removes additional segments from fragments and generates the original HL7 Message.
      Parameters:
        `objHL7BufferStream` - - HL7BufferStream to defragment.
      Returns:
        HL7BufferStream - Defragmented HL7BufferStream .
      Throws:
        `java.io.IOException` - Thrown when IO operation fails.

    - #### setMaxLength

          void setMaxLength(int iLength)

      Sets maximum length for fragments.
      Parameters:
        `iLength` - value of maximum fragment length.