docs: public TransmissionData next()
     {
        if (tc.isEntryEnabled()) SibTr.entry(this, tc, "next");
        if (!transmissionsRemaining) throw new NoSuchElementException();
        
        xmitData.reset(buffer, isTerminal, connection);
        if (tc.isDebugEnabled()) SibTr.debug(this, tc, "layout="+layout);
        if (layout == JFapChannelConstants.XMIT_PRIMARY_ONLY)
        {
           int segmentLength = size + JFapChannelConstants.SIZEOF_PRIMARY_HEADER;
           xmitData.setLayoutToPrimary(segmentLength, 
                                       priority, 
                                       isPooled, 
                                       isExchange, 
                                       connection.getNextRequestNumber(), 
                                       segmentType, 
                                       sendListener);
           bytesRemaining = 0;
           layout = JFapChannelConstants.XMIT_LAYOUT_UNKNOWN;
           transmissionsRemaining = false;
        }
        else if (layout == JFapChannelConstants.XMIT_CONVERSATION)
        {
           int segmentLength = size + 
                               JFapChannelConstants.SIZEOF_PRIMARY_HEADER +
                               JFapChannelConstants.SIZEOF_CONVERSATION_HEADER;
           xmitData.setLayoutToConversation(segmentLength, 
                                            priority, 
                                            isPooled, 
                                            isExchange, 
                                            connection.getNextRequestNumber(), 
                                            segmentType,
                                            conversationId,
                                            requestNumber,
                                            conversation, 
                                            sendListener);
           bytesRemaining = 0;
           layout = JFapChannelConstants.XMIT_LAYOUT_UNKNOWN;
           transmissionsRemaining = false;
        }
        else if (layout == JFapChannelConstants.XMIT_SEGMENT_START)
        {
           int segmentLength = connection.getMaxTransmissionSize(); 
           xmitData.setLayoutToStartSegment(segmentLength,
                                            priority,
                                            isPooled,
                                            isExchange,
                                            connection.getNextRequestNumber(),
                                            segmentType,
                                            conversationId,                                          
                                            requestNumber,
                                            size);
           bytesRemaining -= 
              (connection.getMaxTransmissionSize() - (JFapChannelConstants.SIZEOF_PRIMARY_HEADER      +
                                                      JFapChannelConstants.SIZEOF_CONVERSATION_HEADER +
                                                      JFapChannelConstants.SIZEOF_SEGMENT_START_HEADER));
  
           int maxPayloadInNextTransmission =
              connection.getMaxTransmissionSize() - (JFapChannelConstants.SIZEOF_PRIMARY_HEADER +
                                                     JFapChannelConstants.SIZEOF_CONVERSATION_HEADER);
                                                     
           if (bytesRemaining <= maxPayloadInNextTransmission)
              layout = JFapChannelConstants.XMIT_SEGMENT_END;
           else
              layout = JFapChannelConstants.XMIT_SEGMENT_MIDDLE;                                                    
        }     
        else if (layout == JFapChannelConstants.XMIT_SEGMENT_MIDDLE)
        {
           int segmentLength = connection.getMaxTransmissionSize();
           xmitData.setLayoutToMiddleSegment(segmentLength,
                                             priority,
                                             isPooled,
                                             isExchange,
                                             connection.getNextRequestNumber(),
                                             conversationId,
                                             requestNumber);
           bytesRemaining -= 
              connection.getMaxTransmissionSize() - (JFapChannelConstants.SIZEOF_PRIMARY_HEADER      +
                                                     JFapChannelConstants.SIZEOF_CONVERSATION_HEADER);
  
           int maxPayloadInNextTransmission =
              connection.getMaxTransmissionSize() - (JFapChannelConstants.SIZEOF_PRIMARY_HEADER +
                                                     JFapChannelConstants.SIZEOF_CONVERSATION_HEADER);
                                                     
           if (bytesRemaining <= maxPayloadInNextTransmission)
              layout = JFapChannelConstants.XMIT_SEGMENT_END;
        }
        else if (layout == JFapChannelConstants.XMIT_SEGMENT_END)
        {
           int segmentLength = bytesRemaining +
                               JFapChannelConstants.SIZEOF_PRIMARY_HEADER +
                               JFapChannelConstants.SIZEOF_CONVERSATION_HEADER;
           xmitData.setLayoutToEndSegment(segmentLength,
                                          priority,
                                          isPooled,
                                          isExchange,
                                          connection.getNextRequestNumber(),
                                          conversationId,
                                          requestNumber,
                                          conversation,
                                          sendListener);
           bytesRemaining = 0;
           layout = JFapChannelConstants.XMIT_LAYOUT_UNKNOWN;
           transmissionsRemaining = false;
        }
        else
        {
           if (tc.isDebugEnabled()) SibTr.debug(this, tc, "invalid layout: "+layout);
        }
  
        if (tc.isEntryEnabled()) SibTr.exit(this, tc, "next", xmitData);
        return xmitData;
     }