code: public void open(OutputStream wrappedStream) throws IOException {
          if(isOpen()) {
              // error; should not be opening/wrapping in an unclosed 
              // stream remains open
              throw new IOException("ROS already open for "
                      +Thread.currentThread().getName());
          }
          clearForReuse();
          this.out = wrappedStream;
          startTime = System.currentTimeMillis();
      }
docs: Wrap the given stream, both recording and passing along any data written
  to this RecordingOutputStream.
  
  @param wrappedStream Stream to wrap.  May be null for case where we
  want to write to a file backed stream only.
  
  @throws IOException If failed creation of backing file.