docs: static Type getRequiredOutputStreamType(Class<?> clazz,
                                              int rmicCompatible) // PM46698
      {
          // NOTE: This logic must be kept in sync with write_value
  
          if (clazz == Void.TYPE || // nothing to write
              clazz == Object.class || // writeAny
              clazz.isPrimitive() || // write_<primitive>
              (clazz.isInterface() &&
              (clazz == Serializable.class || // writeAny
               clazz == Externalizable.class || // writeAny
               isCORBAObject(clazz, rmicCompatible) || // write_Object
               (Remote.class).isAssignableFrom(clazz) || // writeRemoteObject
              isAbstractInterface(clazz, rmicCompatible)))) // writeAbstractObject
          {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, "getRequiredOutputStreamType: " + clazz.getName() +
                               " => org.omg.CORBA.portable.OutputStream");
              return TYPE_CORBA_OutputStream;
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "getRequiredOutputStreamType: " + clazz.getName() +
                           " => org.omg.CORBA_2_3.portable.OutputStream");
  
          // requires 'write_value'
          return TYPE_CORBA_2_3_OutputStream;
      }