public class JarExporter extends AbstractExporter
ZipEntry zip entries.
The exporter can optimize the export throughput for binaries, by avoiding to
compress incompressible binaries.
The optimization is enabled for all Deflater compression levels but
Deflater.DEFAULT_COMPRESSION, Deflater.NO_COMPRESSION and
Deflater.BEST_COMPRESSION.
The exporter uses the PlatformNameFormat for formatting the jcr file
names to local ones.
| Constructor and Description |
|---|
JarExporter(File jarFile)
Constructs a new jar exporter that writes to the given file.
|
JarExporter(File jarFile,
int level)
Constructs a new jar exporter that writes to the given file.
|
JarExporter(OutputStream out)
Constructs a new jar exporter that writes to the output stream.
|
JarExporter(OutputStream out,
int level)
Constructs a new jar exporter that writes to the output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the exporter and releases the undelying structures.
|
void |
createDirectory(String relPath) |
void |
createDirectory(VaultFile file,
String relPath) |
void |
open()
Opens the exporter and initializes the undelying structures.
|
void |
write(ZipFile zip,
ZipEntry entry) |
void |
writeFile(InputStream in,
String relPath)
The specified stream remains open after this method returns.
|
void |
writeFile(VaultFile file,
String relPath) |
export, export, export, getExportInfo, getRootPath, isNoMetaInf, isRelativePaths, isVerbose, setNoMetaInf, setProperties, setProperty, setProperty, setRelativePaths, setRootPath, setVerbosepublic JarExporter(File jarFile)
jarFile - the jar filepublic JarExporter(File jarFile, int level)
jarFile - the jar filelevel - level the compression levelpublic JarExporter(OutputStream out)
out - the output streampublic JarExporter(OutputStream out, int level)
out - the output streamlevel - level the compression levelpublic void open()
throws IOException
open in class AbstractExporterIOException - if an I/O error occurspublic void close()
throws IOException
AbstractExporterclose in interface AutoCloseableclose in class AbstractExporterIOException - if an I/O error occurspublic void createDirectory(VaultFile file, String relPath) throws RepositoryException, IOException
createDirectory in class AbstractExporterRepositoryExceptionIOExceptionpublic void createDirectory(String relPath) throws IOException
createDirectory in class AbstractExporterIOExceptionpublic void writeFile(VaultFile file, String relPath) throws RepositoryException, IOException
writeFile in class AbstractExporterRepositoryExceptionIOExceptionpublic void writeFile(InputStream in, String relPath) throws IOException
AbstractExporterThe specified stream remains open after this method returns.
writeFile in class AbstractExporterIOExceptionpublic void write(ZipFile zip, ZipEntry entry) throws IOException
IOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved