public class SWCReader extends Object implements ISWCReader
SWCReader
owns the
result ISWC object.Modifier and Type | Field and Description |
---|---|
static String |
CATALOG_XML |
Constructor and Description |
---|
SWCReader(File swcFile)
Create a SWCReader from a file object
|
SWCReader(File swcFile,
IPackageDITAParser packageDitaParser)
Create a SWCReader from a file object
|
SWCReader(String filename)
Create a SWCReader from a file path.
|
Modifier and Type | Method and Description |
---|---|
File |
getFile()
Get the file handler of the SWC file.
|
static InputStream |
getInputStream(ZipFile zipFile,
String filename)
Get the
InputStream of a file in the SWC archive. |
static String |
getReportingPath(String swcPath,
String libraryPath)
Create a single path that is a combined path of the SWC and the library
inside.
|
ISWC |
getSWC()
Get the SWC model object.
|
public static final String CATALOG_XML
public SWCReader(String filename)
filename
- file pathpublic SWCReader(File swcFile)
swcFile
- input SWC file. The file must exist or a
FileNotFoundException is thrown.public SWCReader(File swcFile, IPackageDITAParser packageDitaParser)
swcFile
- input SWC file. The file must exist or a
FileNotFoundException is thrown.packageDitaParser
- IPackageDITAParser
that will be used to
parse DITA information found in the SWC.public File getFile()
ISWCReader
getFile
in interface ISWCReader
public ISWC getSWC()
ISWCReader
getSWC
in interface ISWCReader
ISWC
objectpublic static InputStream getInputStream(ZipFile zipFile, String filename) throws IOException
InputStream
of a file in the SWC archive. If the file
does not exist in the zip file, return null.zipFile
- Zip file.filename
- Name of the file in the zip archive.IOException
- Error reading file from zip archive.public static String getReportingPath(String swcPath, String libraryPath)
swcPath
- the path of the SWC.libraryPath
- the path of the library withing the SWC.Copyright © 2016 The Apache Software Foundation. All rights reserved.