Class RenderingDiagramWriter

  • All Implemented Interfaces:
    java.io.Serializable

    public class RenderingDiagramWriter
    extends AbstractDiagramWriter
    This implementation of AbstractDiagramWriter uses a PlantUML server to directly render the diagram and write the result to a file. If it does not exist, it will be created (including directories). Any previous content will be overwritten.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RenderingDiagramWriter​(java.io.File file)
      Constructs the writer with the target file.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(java.lang.String name, java.lang.String diagram)
      Writes the diagram to the location specified by the writer implementation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RenderingDiagramWriter

        public RenderingDiagramWriter​(java.io.File file)
        Constructs the writer with the target file. The file must have an extension indicating the rendering type (e.g. png or svg).
        Parameters:
        file - the output file
    • Method Detail

      • write

        public void write​(java.lang.String name,
                          java.lang.String diagram)
                   throws java.io.IOException
        Description copied from class: AbstractDiagramWriter
        Writes the diagram to the location specified by the writer implementation.
        Specified by:
        write in class AbstractDiagramWriter
        Parameters:
        name - the name of the diagram
        diagram - the diagram
        Throws:
        java.io.IOException - if an I/O error occurs