private static void compressTBZ2(Resource[] sources,Resource target,int mode) throws IOException {
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  compressTar(sources,baos,mode);
  _compressBZip2(new ByteArrayInputStream(baos.toByteArray()),target.getOutputStream());
}

private static void compressTBZ2 ( Resource [ ] sources , Resource target , int mode ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; compressTar ( sources , baos , mode ) ; _compressBZip2 ( new ByteArrayInputStream ( baos . toByteArray ( ) ) , target . getOutputStream ( ) ) ; }
compress a source file / directory to a tar / bzip2 file
