| Constructor and Description |
|---|
SWC(File file)
Use this constructor for reading or writing a SWC.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(ISWCComponent component) |
void |
addFile(ISWCFileEntry file) |
void |
addFile(String path,
long mod,
byte[] contentByteArray)
Add a file that will be written into swc file during creation.
|
void |
addLibrary(ISWCLibrary library) |
void |
addProblem(ICompilerProblem problem)
Record a problem encountered while reading or writing the SWC.
|
List<ISWCComponent> |
getComponents()
Get the manifest information.
|
IDITAList |
getDITAList()
Get the
IDITAList for any DITA entries contained in this SWC |
ISWCFileEntry |
getFile(String filename)
Get the asset information encoded in the file tags for the specific filename
|
Map<String,ISWCFileEntry> |
getFiles()
Get the assets information encoded in the file tags.
|
Collection<ISWCLibrary> |
getLibraries()
Get the SWF libraries.
|
ISWCLibrary |
getLibrary(String libraryPath)
Get a library entry by path.
|
Collection<ICompilerProblem> |
getProblems()
The problems found while reading a SWC from disk or writing a SWC to disk.
|
File |
getSWCFile()
Get the SWC file object.
|
ISWCVersion |
getVersion()
Get the SWC version information.
|
boolean |
isANE()
Determine whether this SWC is an ANE file.
|
void |
setDITAList(IDITAList list) |
void |
setIsANE(boolean isANE)
Set whether this SWC is an ANE file or not.
|
String |
toString()
For debugging only.
|
public SWC(File file)
file - SWC file objectpublic void addComponent(ISWCComponent component)
public void addLibrary(ISWCLibrary library)
public void addFile(ISWCFileEntry file)
public void addFile(String path, long mod, byte[] contentByteArray)
path - destination path of the file relative to the root of swc.mod - last modified date for the filecontentByteArray - byte array representing the content of the file to write.public void setDITAList(IDITAList list)
public void setIsANE(boolean isANE)
isANE - true if this SWC is an ANE file, false otherwise.public List<ISWCComponent> getComponents()
ISWCgetComponents in interface ISWCpublic Collection<ISWCLibrary> getLibraries()
ISWCgetLibraries in interface ISWCpublic ISWCLibrary getLibrary(String libraryPath)
ISWCgetLibrary in interface ISWClibraryPath - The path of a library. For exmaple: library.swf.public ISWCVersion getVersion()
ISWCgetVersion in interface ISWCpublic Map<String,ISWCFileEntry> getFiles()
ISWCpublic ISWCFileEntry getFile(String filename)
ISWCpublic File getSWCFile()
ISWCgetSWCFile in interface ISWCpublic IDITAList getDITAList()
ISWCIDITAList for any DITA entries contained in this SWCgetDITAList in interface ISWCIDITAList or null if this SWC dosn't contain DITA contentpublic boolean isANE()
ISWCpublic Collection<ICompilerProblem> getProblems()
ISWCgetProblems in interface ISWCpublic void addProblem(ICompilerProblem problem)
problem - the compiler problem to add to this SWC.Copyright © 2016 The Apache Software Foundation. All rights reserved.