code: public static int getVersion(URI editsURI) throws IOException {
      if (editsURI.getScheme().equals(NNStorage.LOCAL_URI_SCHEME)) {
        StorageDirectory sd = new NNStorage(new StorageInfo()).new StorageDirectory(
            new File(editsURI.getPath()));
        File versionFile = sd.getVersionFile();
        if (!versionFile.exists()) {
          throw new IOException("No VERSION file in: " + editsURI + "version file: " + versionFile );
        }
        Properties props = Storage.getProps(versionFile);
        String layout = props.getProperty(Storage.LAYOUT_VERSION);
        if (layout == null) {
          throw new IOException("No layout version in: " + editsURI);
        }
        return Integer.valueOf(layout);
      } else {
        throw new IOException("Non file journals not supported yet.");
      }
    }
docs: Read version file from the given directory and return
  the layout stored therein.