docs: @Override
      public void writeBytes(byte[] value) throws JMSException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.entry(this, tc, "writeBytes", value);
  
          try {
              // Check that we are in write mode
              checkBodyWriteable("writeBytes");
  
              // This method has different behaviours for storing the byte array, based on the whether the producer
              // has promised not to mess with data after it's been written...
              if (producerWontModifyPayloadAfterSet) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "Producer has promised not to modify the payload after setting it in the message - check if they've violated that promise");
  
                  // The producer has promised not to modify the payload after it's been set, so check
                  // the flag to see whether this is the first, or a subsequent call to writeBytes.
                  if (!writeByteArrayCalled) {
                      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                          SibTr.debug(this, tc, "This is the first call to writeBytes(byte[] value) - storing the byte array reference directly in the underlying MFP object");
  
                      writeByteArrayCalled = true;
  
                      // Set the data buffer & MFP data references to the value param & reset
                      // the dataStart attribute
                      jsBytesMsg.setBytes(value);
                      dataBuffer = value;
                      dataStart = 0;
                  }
  
                  else {
                      // The producer has promised not to modify the payload after it's been set, but the producer has
                      // been naughty by calling this method more than once! Throw exception to admonish the producer.
                      throw (JMSException) JmsErrorUtils.newThrowable(
                                                                      IllegalStateException.class, // JMS illegal state exception
                                                                      "PROMISE_BROKEN_EXCEPTION_CWSIA0511", // promise broken
                                                                      null, // No inserts
                                                                      null, // no cause - original exception
                                                                      "JmsBytesMessageImpl.writeBytes#3", // Probe ID
                                                                      this, // Caller (?)
                                                                      tc); // Trace component
                  }
              }
  
              else {
                  // Producer makes no promises relating to the accessing the message payload, so
                  // make a copy of the byte array at this point to ensure the message is transmitted safely.
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      SibTr.debug(this, tc, "Producer 'payload modification' promise is not in place - make a copy of the byte array");
  
                  // Write the byte array to the output stream
                  // We don't check for value==null as JDK1.1.6 DataOutputStream doesn't
                  writeStream.write(value, 0, value.length);
  
                  // Ensure that the new data gets exported when the time comes.
                  bodySetInJsMsg = false;
              }
  
              // Invalidate the cached toString object, because the message payload has changed.
              cachedBytesToString = null;
          }
  
          catch (IOException ex) {
              // No FFDC code needed
              //(exception repro'ed from 3-param writeBytes method)
              throw (JMSException) JmsErrorUtils.newThrowable(
                                                              ResourceAllocationException.class,
                                                              "WRITE_PROBLEM_CWSIA0186",
                                                              null,
                                                              ex,
                                                              "JmsBytesMessageImpl.writeBytes#4",
                                                              this,
                                                              tc);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              SibTr.exit(this, tc, "writeBytes");
      }