public class SWCDirectoryWriter extends Object
compc can be configured to
write a SWC to an open directory by:
compc -directory=true -output=destination_directory
| Modifier and Type | Field and Description |
|---|---|
protected static String |
CATALOG_XML
File name of "catalog.xml".
|
protected boolean |
enableDebug |
protected boolean |
enableTelemetry |
protected ISWFWriterFactory |
swfWriterFactory |
| Constructor and Description |
|---|
SWCDirectoryWriter(String path)
Write a SWC to an open directory at
path. |
SWCDirectoryWriter(String path,
boolean compressLibrarySWF,
boolean enableDebug,
boolean enableTelemetry,
ISWFWriterFactory swfWriterFactory)
Write a SWC to an open directory at
path. |
| 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 SWCDirectoryWriter(String path)
path.
The library.swf will be debuggable and compressed.path - Target path.public SWCDirectoryWriter(String path, boolean compressLibrarySWF, boolean enableDebug, boolean enableTelemetry, ISWFWriterFactory swfWriterFactory)
path.path - Target path.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.public 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.