code: public byte[] buildBook(final ContentSpec contentSpec, final String requester, final DocBookBuildingOptions builderOptions,
              final Map<String, byte[]> overrideFiles, final BuildType buildType) throws BuilderCreationException, BuildProcessingException {
          if (contentSpec == null) {
              throw new BuilderCreationException("No content specification specified. Unable to build from nothing!");
          } else if (requester == null) {
              throw new BuilderCreationException("A user must be specified as the user who requested the build.");
          }
  
          if (buildType == BuildType.PUBLICAN) {
              docbookBuilder = new PublicanDocBookBuilder(providerFactory);
          } else if (buildType == BuildType.PUBLICAN_PO) {
              docbookBuilder = new PublicanPODocBookBuilder(providerFactory);
          } else if (buildType == BuildType.JDOCBOOK) {
              docbookBuilder = new JDocBookBuilder(providerFactory);
          } else {
              docbookBuilder = new DocBookBuilder(providerFactory);
          }
  
          final HashMap<String, byte[]> files = docbookBuilder.buildBook(contentSpec, requester, builderOptions, overrideFiles);
  
          // Create the zip file
          byte[] zipFile = null;
          try {
              zipFile = ZipUtilities.createZip(files);
          } catch (final Exception e) {
              e.printStackTrace();
          }
          return zipFile;
      }
docs: Builds a book into a zip file for the passed Content Specification.
  
  @param contentSpec    The content specification that is to be built. It should have already been validated, if not errors may occur.
  @param requester      The user who requested the book to be built.
  @param builderOptions The set of options what are to be when building the book.
  @param overrideFiles
  @param buildType
  @return A byte array that is the zip file
  @throws BuildProcessingException Any unexpected errors that occur during building.
  @throws BuilderCreationException Any error that occurs while trying to setup/create the builder