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(java.io.File jarFile)
Constructs a new jar exporter that writes to the given file.
|
JarExporter(java.io.File jarFile,
int level)
Constructs a new jar exporter that writes to the given file.
|
JarExporter(java.io.OutputStream out)
Constructs a new jar exporter that writes to the output stream.
|
JarExporter(java.io.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(java.lang.String relPath) |
void |
createDirectory(VaultFile file,
java.lang.String relPath) |
void |
open()
Opens the exporter and initializes the undelying structures.
|
void |
write(java.util.zip.ZipFile zip,
java.util.zip.ZipEntry entry) |
void |
writeFile(java.io.InputStream in,
java.lang.String relPath) |
void |
writeFile(VaultFile file,
java.lang.String relPath) |
export, export, export, getExportInfo, getRootPath, isNoMetaInf, isRelativePaths, isVerbose, setNoMetaInf, setProperties, setProperty, setProperty, setRelativePaths, setRootPath, setVerbose
public JarExporter(java.io.File jarFile)
jarFile
- the jar filepublic JarExporter(java.io.File jarFile, int level)
jarFile
- the jar filelevel
- level the compression levelpublic JarExporter(java.io.OutputStream out)
out
- the output streampublic JarExporter(java.io.OutputStream out, int level)
out
- the output streamlevel
- level the compression levelpublic void open() throws java.io.IOException
open
in class AbstractExporter
java.io.IOException
- if an I/O error occurspublic void close() throws java.io.IOException
AbstractExporter
close
in class AbstractExporter
java.io.IOException
- if an I/O error occurspublic void createDirectory(VaultFile file, java.lang.String relPath) throws RepositoryException, java.io.IOException
createDirectory
in class AbstractExporter
RepositoryException
java.io.IOException
public void createDirectory(java.lang.String relPath) throws java.io.IOException
createDirectory
in class AbstractExporter
java.io.IOException
public void writeFile(VaultFile file, java.lang.String relPath) throws RepositoryException, java.io.IOException
writeFile
in class AbstractExporter
RepositoryException
java.io.IOException
public void writeFile(java.io.InputStream in, java.lang.String relPath) throws java.io.IOException
writeFile
in class AbstractExporter
java.io.IOException
public void write(java.util.zip.ZipFile zip, java.util.zip.ZipEntry entry) throws java.io.IOException
java.io.IOException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"