code: public static RevisionDataOutputStream wrap(OutputStream outputStream) throws IOException {
          if (outputStream instanceof RandomAccessOutputStream) {
              return new RandomRevisionDataOutput(outputStream);
          } else {
              return new NonSeekableRevisionDataOutput(outputStream);
          }
      }
docs: Wraps the given OutputStream into a specific implementation of RevisionDataOutputStream.
  
  @param outputStream The OutputStream to wrap.
  @return A new instance of a RevisionDataOutputStream sub-class, depending on whether the given OutputStream is a
  RandomAccessOutputStream (supports seeking) or not.
  @throws IOException If an IO Exception occurred. This is because if the given OutputStream is a RandomAccessOutputStream, this
  will pre-allocate 4 bytes for the length.