test_class.declarator: TEST_FILE = "CHANGELOG.md"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_FILE = "CHANGELOG.md";
test_class.type: String
test_class.var_name: TEST_FILE
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/CompressionUtilTest.java
test_class.identifier: CompressionUtilTest
test_case.body: @Test
      public void compressNoOverwrite() throws Exception {
          // test file to use for tests
          File originalSourceFile = new File(TEST_FILE);
  
          // copy original source to build directory -- becomes our actual source file
          File sourceFile = new File("target", originalSourceFile.getName());
          FileUtil.copy(originalSourceFile, sourceFile, true);
  
          // NOTE: just for junit, let's make sure the compressed file does not exist yet
          // it may exist if "ant clean" not run between tests
          Algorithm a = Algorithm.findByName("gzip");
          File expectedCompressedFile = new File(sourceFile.getParentFile(), sourceFile.getName() + "." + a.getFileExtension());
          expectedCompressedFile.delete();
  
          // compress the source file (original should have been deleted)
          CompressionUtil.compress(sourceFile, a.getName(), false);
  
          try {
              CompressionUtil.compress(sourceFile, a.getName(), false);
              Assert.fail("Should have failed");
          } catch (FileAlreadyExistsException e) {
              // correct behavior
          }
      }
test_case.class_method_signature: CompressionUtilTest.compressNoOverwrite()
test_case.full_signature: @Test public void compressNoOverwrite()
test_case.identifier: compressNoOverwrite
test_case.invocations: getName copy findByName getParentFile getName getFileExtension delete compress getName compress getName fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void compressNoOverwrite()
focal_class.declarator: logger = LoggerFactory.getLogger(CompressionUtil.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(CompressionUtil.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/CompressionUtil.java
focal_class.identifier: CompressionUtil
focal_class.class_method_signature: CompressionUtil.isAlgorithmSupported(String algorithm)
focal_class.full_signature: public static boolean isAlgorithmSupported(String algorithm)
focal_class.identifier: isAlgorithmSupported
focal_class.modifiers: public static
focal_class.parameters: (String algorithm)
focal_class.return: boolean
focal_class.signature: boolean isAlgorithmSupported(String algorithm)
focal_class.class_method_signature: CompressionUtil.isFileExtensionSupported(String fileExt)
focal_class.full_signature: public static boolean isFileExtensionSupported(String fileExt)
focal_class.identifier: isFileExtensionSupported
focal_class.modifiers: public static
focal_class.parameters: (String fileExt)
focal_class.return: boolean
focal_class.signature: boolean isFileExtensionSupported(String fileExt)
focal_class.class_method_signature: CompressionUtil.compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.full_signature: public static File compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.identifier: compress
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.return: File
focal_class.signature: File compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.class_method_signature: CompressionUtil.compress(File sourceFile, File targetDir, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.full_signature: public static File compress(File sourceFile, File targetDir, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.identifier: compress
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, File targetDir, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.return: File
focal_class.signature: File compress(File sourceFile, File targetDir, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_class.class_method_signature: CompressionUtil.uncompress(File sourceFile, boolean deleteSourceFileAfterUncompressed)
focal_class.full_signature: public static File uncompress(File sourceFile, boolean deleteSourceFileAfterUncompressed)
focal_class.identifier: uncompress
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, boolean deleteSourceFileAfterUncompressed)
focal_class.return: File
focal_class.signature: File uncompress(File sourceFile, boolean deleteSourceFileAfterUncompressed)
focal_class.class_method_signature: CompressionUtil.uncompress(File sourceFile, File targetDir, boolean deleteSourceFileAfterUncompressed)
focal_class.full_signature: public static File uncompress(File sourceFile, File targetDir, boolean deleteSourceFileAfterUncompressed)
focal_class.identifier: uncompress
focal_class.modifiers: public static
focal_class.parameters: (File sourceFile, File targetDir, boolean deleteSourceFileAfterUncompressed)
focal_class.return: File
focal_class.signature: File uncompress(File sourceFile, File targetDir, boolean deleteSourceFileAfterUncompressed)
focal_class.class_method_signature: CompressionUtil.compress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterCompressed)
focal_class.full_signature: private static void compress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterCompressed)
focal_class.identifier: compress
focal_class.modifiers: private static
focal_class.parameters: (Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterCompressed)
focal_class.return: void
focal_class.signature: void compress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterCompressed)
focal_class.class_method_signature: CompressionUtil.uncompress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterUncompressed)
focal_class.full_signature: private static void uncompress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterUncompressed)
focal_class.identifier: uncompress
focal_class.modifiers: private static
focal_class.parameters: (Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterUncompressed)
focal_class.return: void
focal_class.signature: void uncompress(Algorithm a, File sourceFile, File targetFile, boolean deleteSourceFileAfterUncompressed)
focal_class.class_method_signature: CompressionUtil.uncompress(Algorithm a, InputStream srcIn, OutputStream destOut)
focal_class.full_signature: private static void uncompress(Algorithm a, InputStream srcIn, OutputStream destOut)
focal_class.identifier: uncompress
focal_class.modifiers: private static
focal_class.parameters: (Algorithm a, InputStream srcIn, OutputStream destOut)
focal_class.return: void
focal_class.signature: void uncompress(Algorithm a, InputStream srcIn, OutputStream destOut)
focal_method.body: public static File compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed) throws FileAlreadyExistsException, IOException {
          return compress(sourceFile, sourceFile.getParentFile(), algorithm, deleteSourceFileAfterCompressed);
      }
focal_method.class_method_signature: CompressionUtil.compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_method.full_signature: public static File compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_method.identifier: compress
focal_method.invocations: compress getParentFile
focal_method.modifiers: public static
focal_method.parameters: (File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)
focal_method.return: File
focal_method.signature: File compress(File sourceFile, String algorithm, boolean deleteSourceFileAfterCompressed)