* @ant.task category="packaging"
*/
public class BZip2 extends Pack {
protected void pack() {
CBZip2OutputStream zOut = null;
try {
BufferedOutputStream bos =
new BufferedOutputStream(new FileOutputStream(zipFile));
bos.write('B');
bos.write('Z');
zOut = new CBZip2OutputStream(bos);
zipFile(source, zOut);
} catch (IOException ioe) {
String msg = "Problem creating bzip2 " + ioe.getMessage();
throw new BuildException(msg, ioe, getLocation());
} finally {
if (zOut != null) {
try {
// close up
zOut.close();
} catch (IOException e) {
//ignore
}
}
}