docs: public void writeEmptyPages(Stack<Integer> emptyPages, RandomAccessFile file) throws IOException {
      if(emptyPages.isEmpty()) {
        this.emptyPagesSize = 0;
        return; // nothing to write
      }
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      oos.writeObject(emptyPages);
      oos.flush();
      byte[] bytes = baos.toByteArray();
      this.emptyPagesSize = bytes.length;
      oos.close();
      baos.close();
      if(this.emptyPagesSize > 0) {
        file.seek(file.length());
        file.write(bytes);
      }
    }