code: @Override
      public void openFile(String repositoryHash,
                           String filename,
                           Date currentDate) throws JournalException {
          try {
              super.testStateChange(State.FILE_OPEN);
  
              writer = new RmiTransportWriter(receiver, repositoryHash, filename);
              xmlWriter =
                      new IndentingXMLEventWriter(XMLOutputFactory
                              .newInstance()
                              .createXMLEventWriter(new BufferedWriter(writer,
                                                                       bufferSize)));
  
              parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate);
  
              super.setState(State.FILE_OPEN);
          } catch (XMLStreamException e) {
              throw new JournalException(e);
          } catch (FactoryConfigurationError e) {
              throw new JournalException(e);
          }
      }
docs: check state, send the open request, open a very special writer, write the
  file opening, set state