docs: public boolean check() throws Exception {
          // we need to create a copy of the file, because the container file
          // might be at the end of the stream.
          File fileCopy = File.createTempFile("modeshape-sequencer-epub", ".tmp");
          IoUtil.write(in, new BufferedOutputStream(new FileOutputStream(fileCopy)));
  
          List<String> rootfiles = new ArrayList<>();
          try (ZipInputStream zipStream =
                  new ZipInputStream(new FileInputStream(fileCopy))) {
              rootfiles = getRootfiles(zipStream);
          }
  
          if (!rootfiles.isEmpty()) {
              try (ZipInputStream zipStream =
                      new ZipInputStream(new FileInputStream(fileCopy))) {
                  ZipEntry entry = null;
                  while ((entry = zipStream.getNextEntry()) != null) {
                      String entryName = entry.getName();
                      if (rootfiles.contains(entryName)) {
                          checkRootfile(zipStream, entry);
                      }
                  }
              }
          } else {
              throw new IllegalArgumentException("No rootfile package found in given EPUB file.");
          }
  
          // try to delete the file immediately or on JVM exit
          boolean deleted = false;
          try {
              deleted = fileCopy.delete();
          } catch (SecurityException e) {
              // ignore
          }
          if (!deleted) {
              fileCopy.deleteOnExit();
          }
  
          return true;
      }