public class SWCWriter extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected static String | CATALOG_XMLFile name of "catalog.xml". | 
| protected boolean | enableDebug | 
| protected boolean | enableTelemetry | 
| protected ISWFWriterFactory | swfWriterFactory | 
| Constructor and Description | 
|---|
| SWCWriter(String filename)Create a SWC where the library.swf is build with
 debug and is compressed. | 
| SWCWriter(String filename,
         boolean compressLibrarySWF,
         boolean enableDebug,
         boolean enableTelemetry,
         ISWFWriterFactory swfWriterFactory) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | addDigestToLibrary(DigestOutputStream digestStream,
                  ISWCLibrary library)Add the digest from the digestStream to the ISWCLibrary. | 
| boolean | compressLibrarySWF() | 
| protected DigestOutputStream | getDigestOutputStream(ISWCLibrary library,
                     OutputStream outputStream)Get a digest stream output if the library needs to create a digest
 for the library.swf. | 
| Header.Compression | getLibrarySWFCompression() | 
| void | write(ISWC swc)This method defines the serialization order. | 
| protected void | writeCatalogXML(ISWC swc,
               Writer writer)Serialize the SWC model's catalog.xml to a writer. | 
protected static final String CATALOG_XML
protected final boolean enableDebug
protected final boolean enableTelemetry
protected final ISWFWriterFactory swfWriterFactory
public SWCWriter(String filename) throws FileNotFoundException
filename - path to write the file to.FileNotFoundExceptionpublic SWCWriter(String filename, boolean compressLibrarySWF, boolean enableDebug, boolean enableTelemetry, ISWFWriterFactory swfWriterFactory) throws FileNotFoundException
filename - path to write the file to.compressLibrarySWF - - true if the library will be built compressed,
 false otherwise.enableDebug - - true if the library should be build with debug
 enabled, false otherwise.swfWriterFactory - - factory for creating swf writers.FileNotFoundExceptionpublic boolean compressLibrarySWF()
public Header.Compression getLibrarySWFCompression()
public void write(ISWC swc) throws IOException
write in interface ISWCWriterswc - SWC modelIOException - errorprotected final void writeCatalogXML(ISWC swc, Writer writer)
swc - modelprotected DigestOutputStream getDigestOutputStream(ISWCLibrary library, OutputStream outputStream)
library - protected void addDigestToLibrary(DigestOutputStream digestStream, ISWCLibrary library)
digestStream - may be null. If null no digest is created.library - The library to update. May not be null.NullPointerException - if library is null.Copyright © 2016 The Apache Software Foundation. All rights reserved.