code: public static <T extends Serializable> Observable<T> write(Observable<T> source,
              final ObjectOutputStream oos) {
          return source.doOnNext(new Action1<T>() {
  
              @Override
              public void call(T t) {
                  try {
                      oos.writeObject(t);
                  } catch (IOException e) {
                      throw new RuntimeException(e);
                  }
              }
          });
      }
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