> + BufferedInputStream in = new BufferedInputStream(fin);
> + while ((len = in.read(buf)) != -1) {
> + tos.write(buf, 0, len);
> + }
> + in.close();
> + }
> + tos.closeArchiveEntry();
> + }
> + tos.close();
> + return tarFile;
> + }
> +
> + public static File tar(File baseDir, File tarFile) throws IOException {
> + // Check that the directory is a directory, and get its contents
> + if (!baseDir.isDirectory())
> + throw new IllegalArgumentException("Compress: not a directory: " +
> baseDir);
Same thing, use `checkArgument`.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r10838930