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()
ISWC
getComponents
in interface ISWC
public Collection<ISWCLibrary> getLibraries()
ISWC
getLibraries
in interface ISWC
public ISWCLibrary getLibrary(String libraryPath)
ISWC
getLibrary
in interface ISWC
libraryPath
- The path of a library. For exmaple: library.swf.public ISWCVersion getVersion()
ISWC
getVersion
in interface ISWC
public Map<String,ISWCFileEntry> getFiles()
ISWC
public ISWCFileEntry getFile(String filename)
ISWC
public File getSWCFile()
ISWC
getSWCFile
in interface ISWC
public IDITAList getDITAList()
ISWC
IDITAList
for any DITA entries contained in this SWCgetDITAList
in interface ISWC
IDITAList
or null if this SWC dosn't contain DITA contentpublic boolean isANE()
ISWC
public Collection<ICompilerProblem> getProblems()
ISWC
getProblems
in interface ISWC
public void addProblem(ICompilerProblem problem)
problem
- the compiler problem to add to this SWC.Copyright © 2016 The Apache Software Foundation. All rights reserved.