public class SWCLibrary extends Object implements ISWCLibrary
Constructor and Description |
---|
SWCLibrary(String path)
Use this constructor for reading a SWC library.
|
SWCLibrary(String path,
ISWF swf)
Use this constructor for writing a SWC library.
|
Modifier and Type | Method and Description |
---|---|
void |
addDigest(ISWCDigest digest)
Add a new digest to the library.
|
void |
addNameToKeepAS3MetadataSet(String name)
Adds a metadata name to appear in the
<keep-as3-metadata> tag. |
void |
addScript(ISWCScript script)
Add an
ISWCScript to the library. |
List<ISWCDigest> |
getDigests()
Get the digests of the library.
|
Set<String> |
getKeepAS3MetadataSet()
Gets all the metadata names in the
<keep-as3-metadata> tag. |
String |
getPath()
Get the path of the library SWF file.
|
ISWCScript |
getScript(String name)
Get script by name.
|
List<ISWCScript> |
getScripts()
Get all the
IScript objects in this library. |
ISWF |
getSWF()
Get the SWF model for the library.
|
void |
readSWFInputStream(SWFReader swfReader,
ISWC swc)
Read the
InputStream of the library SWF file. |
void |
removeDigest(ISWCDigest digest)
Remove an existing digest from the library.
|
String |
toString()
For debugging only.
|
public SWCLibrary(String path, ISWF swf)
path
- relative path of the library in the SWC archiveswf
- model for the library SWFpublic SWCLibrary(String path)
path
- relative path of the library in the SWC archivepublic void addScript(ISWCScript script)
ISWCLibrary
ISWCScript
to the library.addScript
in interface ISWCLibrary
script
- IScript
objectpublic String getPath()
ISWCLibrary
getPath
in interface ISWCLibrary
public List<ISWCScript> getScripts()
ISWCLibrary
IScript
objects in this library.getScripts
in interface ISWCLibrary
public Set<String> getKeepAS3MetadataSet()
ISWCLibrary
<keep-as3-metadata>
tag.getKeepAS3MetadataSet
in interface ISWCLibrary
public void addNameToKeepAS3MetadataSet(String name)
ISWCLibrary
<keep-as3-metadata>
tag.addNameToKeepAS3MetadataSet
in interface ISWCLibrary
name
- A metadata name, like "Bindable"
.public void readSWFInputStream(SWFReader swfReader, ISWC swc)
ISWCLibrary
InputStream
of the library SWF file.readSWFInputStream
in interface ISWCLibrary
swfReader
- containing SWFReader
objectswc
- containing ISWC
objectpublic ISWCScript getScript(String name)
ISWCLibrary
getScript
in interface ISWCLibrary
name
- script namepublic List<ISWCDigest> getDigests()
ISWCLibrary
getDigests
in interface ISWCLibrary
public ISWF getSWF()
ISWCLibrary
getSWF
in interface ISWCLibrary
public void addDigest(ISWCDigest digest)
addDigest
in interface ISWCLibrary
digest
- The digest to add. May not be null.public void removeDigest(ISWCDigest digest)
digest
- The digest to add. May not be null.Copyright © 2016 The Apache Software Foundation. All rights reserved.