docs: int writeBytes(OutputStream userstream) throws IOException {
          if (_patch.getParent() != null) {
              throw new IllegalStateException("Tried to flush while not on top-level");
          }
  
          try {
              BlockedByteInputStream datastream =
                  new BlockedByteInputStream(_manager.buffer());
              int size = writeRecursive(datastream, userstream, _patch);
              return size;
          } finally {
              _patch.reset();
          }
      }