code: public static <T extends Serializable> Flowable<T> write(Flowable<T> source, final ObjectOutputStream oos) {
          return source.doOnNext(new Consumer<T>() {
  
              @Override
              public void accept(T t) throws IOException {
                  oos.writeObject(t);
              }
          });
      }
docs: Returns a duplicate of the input stream but with the side effect that
  emissions from the source are written to the {@link ObjectOutputStream}.
  
  @param source
  the source of objects to write
  @param oos
  the output stream to write to
  @param <T>
  the generic type of the objects being serialized
  @return re-emits the input stream