code: private void writeObject(ObjectOutputStream outStream) throws IOException {
          if (classLoaderToPropagate == SYSTEM_CLASS_LOADER)
              classLoaderIdentifier = "";
          else if (classLoaderToPropagate != null) {
              classLoaderIdentifier = classLoaderContextProvider.getClassLoaderIdentifier(classLoaderToPropagate);
              if (classLoaderIdentifier == null)
                  throw new NotSerializableException(classLoaderToPropagate.getClass().getName());
          }
          PutField fields = outStream.putFields();
          fields.put(CLASS_LOADER_IDENTIFIER, classLoaderIdentifier);
          outStream.writeFields();
      }
docs: Serialize the given object.
  
  @param outStream The stream to write the serialized data.
  
  @throws IOException