code: public static SingleFileRepositoryConnection createEmptyRepository(File jsonFile) throws IOException {
          if (jsonFile.exists()) {
              throw new IOException("Cannot create empty repository as the file already exists: " + jsonFile.getAbsolutePath());
          }
  
          OutputStreamWriter writer = null;
          try {
              writer = new OutputStreamWriter(new FileOutputStream(jsonFile), "UTF-8");
              writer.write("[]");
          } finally {
              if (writer != null) {
                  writer.close();
              }
          }
  
          return new SingleFileRepositoryConnection(jsonFile);
      }
docs: Create an empty single file Repository connection.
  <p>
  Repository data will be stored in {@code jsonFile} which must not exist and will be created by this method.
  
  @param jsonFile the location for the repository file
  @return the repository connection
  @throws IOException if {@code jsonFile} already exists or there is a problem creating the file