docs: private byte[] _exportBody(int encoding) throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "_exportBody", encoding);
  
          int requestedIntegerEncoding;
          int requestedFloatEncoding;
  
          try {
              // get data from output stream.
              dataBuffer = _writeBytes.toByteArray();
              dataStart = 0; // start from the first byte in the buffer
  
              // The following code (up to returning dataBuffer) used to be wrapped in a check to see if the
              // message was populated by the client, however it was realised that the alternative case would
              // never be executed in SIB, so was removed. The variable that was checked was: 'populated_by_client'
  
              // split the encoding parameter into its integer and float components
              requestedIntegerEncoding = encoding & ApiJmsConstants.ENC_INTEGER_MASK;
              requestedFloatEncoding = encoding & ApiJmsConstants.ENC_FLOAT_MASK;
  
              // if the caller has asked for an integer encoding that differs from the one currently in the
              // buffer, then we have to go through our list of numeric items byteswapping them all
  
              if (((integerEncoding <= 1) && (requestedIntegerEncoding == 2))
                  || ((integerEncoding == 2) && (requestedIntegerEncoding <= 1))) {
  
                  // For economy we split the actual list into a set of arrays. The last segment of the list is held in the
                  // variables numeric_count, numeric_offsets[] and numeric_sizes[]. Previous segments are saved away in the
                  // numerics Vector. If there are any saved-away values in the vectors, we process them first
                  if (integers != null) {
                      for (int i = 0; i < integers.size(); i += 2) {
                          // Retrieve the offset and size arrays from their storing place in
                          // the Vector. NB the Vector is built
                          // by the recordNumeric method, so this code has to be kept in
                          // step with that.
  
                          int[] offsets = (int[]) integers.elementAt(i);
                          int[] sizes = (int[]) integers.elementAt(i + 1);
  
                          for (int j = 0; j < ARRAY_SIZE; j++) {
                              reverse(dataBuffer, offsets[j], sizes[j]);
                          }
                      }
                  }
  
                  // Now run through the final segment of the list - this is still in our variables and never made it into
                  // the Vector
  
                  for (int j = 0; j < integer_count; j++) {
                      reverse(dataBuffer, integer_offsets[j], integer_sizes[j]);
                  }
                  // d252032 can't reset this.*encoding since we get the unswapped data from
                  // the stream each time.
                  // Remember that the encoding has now changed
                  //this.integerEncoding = requestedIntegerEncoding;
              }
  
              // if the caller has asked for a float encoding that differs from the one currently in the
              // buffer, then we have to go through the float vector and regenerate the float and double elements
              if (floatEncoding != requestedFloatEncoding) {
  
                  // For economy we split the actual list into a set of arrays. The last segment of the list is held in the
                  // variables numeric_count, numeric_offsets[] and numeric_sizes[]. Previous segments are saved away in the
                  // numerics Vector. If there are any saved-away values in the vectors, we process them first
                  byte[] floatbytes;
                  ByteArrayOutputStream floatbaos = new ByteArrayOutputStream(8);
                  DataOutputStream floatstream = new DataOutputStream(floatbaos);
  
                  if (float_offsets != null && float_values != null) { // These ought to get set at the same time, but check both for safety.
                      for (int i = 0; i < float_offsets.size(); i++) {
                          floatbaos.reset();
                          Object value = float_values.elementAt(i);
                          int offset = ((Integer) (float_offsets.elementAt(i))).intValue();
  
                          if (value instanceof Float) {
                              float floatValue = ((Float) value).floatValue();
  
                              switch (requestedFloatEncoding) {
                                  case ApiJmsConstants.ENC_FLOAT_IEEE_NORMAL:
                                  case ApiJmsConstants.ENC_FLOAT_IEEE_REVERSED:
                                      floatstream.writeInt(Float.floatToIntBits(floatValue));
                                      break;
                                  case ApiJmsConstants.ENC_FLOAT_S390:
                                      floatstream.writeInt(JMS390FloatSupport.floatToS390IntBits(floatValue));
                                      break;
                                  default:
                                      throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                                                      "BAD_ENCODING_CWSIA0181", new Object[] { Integer
                                                                                                      .toHexString(requestedFloatEncoding) }, tc);
                              }
  
                              floatbytes = floatbaos.toByteArray();
                              if (requestedFloatEncoding == ApiJmsConstants.ENC_FLOAT_IEEE_REVERSED) {
                                  reverse(floatbytes, 0, 4); // reverse all 4 bytes
                              }
                              System.arraycopy(floatbytes, 0, dataBuffer, offset, 4);
                          }
  
                          else if (value instanceof Double) {
                              double doubleValue = ((Double) value).doubleValue();
  
                              switch (requestedFloatEncoding) {
                                  case ApiJmsConstants.ENC_FLOAT_IEEE_NORMAL:
                                  case ApiJmsConstants.ENC_FLOAT_IEEE_REVERSED:
                                      floatstream.writeLong(Double.doubleToLongBits(doubleValue));
                                      break;
                                  case ApiJmsConstants.ENC_FLOAT_S390:
                                      floatstream.writeLong(JMS390FloatSupport.doubleToS390LongBits(doubleValue));
                                      break;
                                  default:
                                      throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                                                      "BAD_ENCODING_CWSIA0181", new Object[] { Integer
                                                                                                      .toHexString(requestedFloatEncoding) }, tc);
                              }
  
                              floatbytes = floatbaos.toByteArray();
                              if (requestedFloatEncoding == ApiJmsConstants.ENC_FLOAT_IEEE_REVERSED) {
                                  reverse(floatbytes, 0, 8); // reverse all 8 bytes
                              }
                              System.arraycopy(floatbytes, 0, dataBuffer, offset, 8);
                          }
                      }
                  }
  
                  // d252032 can't reset this.*encoding since we get the unswapped data from
                  // the stream each time.
                  // Remember that the encoding has now changed
                  //this.floatEncoding = requestedFloatEncoding;
  
              }
  
          } catch (IOException e) {
              // No FFDC code needed
              // d238447 FFDC review. This seems an appropriate case to generate an FFDC.
              throw (JMSException) JmsErrorUtils.newThrowable(
                                                              JMSException.class,
                                                              "DATA_STREAM_PROBLEM_CWSIA0182",
                                                              null,
                                                              e,
                                                              "JmsBytesMessageImpl._exportBody#1",
                                                              this,
                                                              tc
                              );
          }
  
          // Return the body
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "_exportBody", dataBuffer);
          return dataBuffer;
      }