public final void buildSignedDirectory() throws Exception {
  try (ByteArrayOutputStream mimeContent=new ByteArrayOutputStream()){
    build(mimeContent);
    log.debug("Generated directory content:\n{}\n",mimeContent.toString());
    byte[] contentBytes=mimeContent.toByteArray();
    mimeContent.reset();
    sign(contentBytes,mimeContent);
    Files.write(tempConfPath,mimeContent.toByteArray());
    log.debug("Written signed directory to '{}'",tempConfPath);
  }
 }

public final void buildSignedDirectory ( ) throws Exception { try ( ByteArrayOutputStream mimeContent = new ByteArrayOutputStream ( ) ) { build ( mimeContent ) ; log . debug ( "Generated directory content:\n{}\n" , mimeContent . toString ( ) ) ; byte [ ] contentBytes = mimeContent . toByteArray ( ) ; mimeContent . reset ( ) ; sign ( contentBytes , mimeContent ) ; Files . write ( tempConfPath , mimeContent . toByteArray ( ) ) ; log . debug ( "Written signed directory to '{}'" , tempConfPath ) ; } }
generates a signed directory mime for the global configuration and writes the directory contents to a temporary location .
