/** * This method writes the pic code for the given message trace into the given file. * * @param msgTrace * The message trace to convert. * @param sdMode * The mode of the sequence diagram (allocation, assembly). * @param shortLabels * Determines whether to use short labels or not. * @param outputFilename * The name of the file in which the code will be written. * * @throws FileNotFoundException * If the given file is somehow invalid. * @throws UnsupportedEncodingException * If the used default encoding is not supported. */ public static void writePicForMessageTrace(final MessageTrace msgTrace, final SDModes sdMode, final String outputFilename, final boolean shortLabels) throws FileNotFoundException, UnsupportedEncodingException { final PrintStream ps = new PrintStream(new FileOutputStream(outputFilename), false, ENCODING); SequenceDiagramFilter.picFromMessageTrace(msgTrace, sdMode, ps, shortLabels); ps.flush(); ps.close(); }