@Component(role=Pack200Tool.class, hint="default") public class DefaultPack200Tool extends Object implements Pack200Tool
Pack200Tool
.Modifier and Type | Field and Description |
---|---|
static String |
PACK_EXTENSION |
static String |
PACK_GZ_EXTENSION |
ROLE
Constructor and Description |
---|
DefaultPack200Tool() |
Modifier and Type | Method and Description |
---|---|
void |
pack(File source,
File destination,
Map<String,String> props,
boolean gzip)
Pack a jar.
|
File |
packJar(File jarFile,
boolean gzip,
List<String> passFiles)
Pack the given jarfile and return the packed file.
|
void |
packJars(File directory,
FileFilter jarFileFilter,
boolean gzip,
List<String> passFiles)
Packs from the given
directory , all files matched by the filter. |
void |
repack(File source,
File destination,
Map<String,String> props)
Repack a jar.
|
void |
unpack(File source,
File destination,
Map<String,String> props)
Unpack a jar.
|
File |
unpackJar(File packFile)
Unpack the given file and return it.
|
void |
unpackJars(File directory,
FileFilter pack200FileFilter)
UnPacks from the given
directory , all files matched by the filter. |
public static final String PACK_GZ_EXTENSION
public static final String PACK_EXTENSION
public void pack(File source, File destination, Map<String,String> props, boolean gzip) throws IOException
pack
in interface Pack200Tool
source
- the source jardestination
- the packed jarprops
- the packing propertiesgzip
- true if the destination fileIOException
public void repack(File source, File destination, Map<String,String> props) throws IOException
repack
in interface Pack200Tool
source
- the source jardestination
- the destination jar (may be the same as the source jar)props
- the packing propertiesIOException
public void unpack(File source, File destination, Map<String,String> props) throws IOException
unpack
in interface Pack200Tool
source
- the packed jardestination
- the unpacked jarprops
- the packing propertiesIOException
public void packJars(File directory, FileFilter jarFileFilter, boolean gzip, List<String> passFiles) throws IOException
directory
, all files matched by the filter.
If parameter gzip
is setted to true
, then after it gzip packed files.packJars
in interface Pack200Tool
directory
- the location of the directory containing files to packjarFileFilter
- the filter to determin which files to packgzip
- flag to gzip files after pack thempassFiles
- the list of file names to be passed as not pack200 compressedIOException
public File packJar(File jarFile, boolean gzip, List<String> passFiles) throws IOException
packJar
in interface Pack200Tool
jarFile
- jar file to packgzip
- flag to enable gzip compressionpassFiles
- the list of file names to be passed as not pack200 compressedIOException
public void unpackJars(File directory, FileFilter pack200FileFilter) throws IOException
directory
, all files matched by the filter.unpackJars
in interface Pack200Tool
directory
- the location of the directory containing files to unpackpack200FileFilter
- the fileter to determin which files to unpakcIOException
public File unpackJar(File packFile) throws IOException
unpackJar
in interface Pack200Tool
packFile
- the file to unpackIOException
Copyright © 2005–2016 MojoHaus. All rights reserved.