boolean useCompression = targetSettings.useCompression();
if (config.getOutputSwcAsDirectory())
{
final String path = FilenameNormalization.normalize(outputOptionValue);
final ISWCWriter swcWriter = new SWCDirectoryWriter(path, useCompression,
targetSettings.isDebugEnabled(),
SWFWriterAndSizeReporter.getSWFWriterFactory(targetSettings.getSizeReport()));
swcWriter.write(swc);
long endTime = System.nanoTime();
String seconds = String.format("%5.3f", (endTime - startTime) / 1e9);
Map<String, Object> params = new HashMap<String, Object>();
params.put("path", path);
params.put("seconds", seconds);
swcOutputMessage =
Messages.getString("COMPC.swc_written_open_directory_in_seconds_format",
params);
}
else
{
final ISWCWriter swcWriter = new SWCWriter(outputOptionValue, useCompression,
targetSettings.isDebugEnabled(),
SWFWriterAndSizeReporter.getSWFWriterFactory(targetSettings.getSizeReport()));
swcWriter.write(swc);
final File outputFile = new File(outputOptionValue);
long endTime = System.nanoTime();
String seconds = String.format("%5.3f", (endTime - startTime) / 1e9);
Map<String, Object> params = new HashMap<String, Object>();
params.put("byteCount", outputFile.length());