@Test public void willReturnAnArchiveTypeOfTARForABZ2File() throws Exception { File testFile = new File(String.valueOf(this.getClass().getResource("/jetty/files/download.tar.bz2").getFile())); CompressedFile compressedFile = new CompressedFile(testFile); assertThat(compressedFile.getArchiveType(), is(equalTo(TAR))); }
DownloadableFileType getArchiveType() { try { return DownloadableFileType.valueOf(FilenameUtils.getExtension(decompressedFilename).toUpperCase()); } catch (IllegalArgumentException e) { LOG.debug("Not a recognised Archive type"); return null; } }
CompressedFile { DownloadableFileType getArchiveType() { try { return DownloadableFileType.valueOf(FilenameUtils.getExtension(decompressedFilename).toUpperCase()); } catch (IllegalArgumentException e) { LOG.debug("Not a recognised Archive type"); return null; } } }
CompressedFile { DownloadableFileType getArchiveType() { try { return DownloadableFileType.valueOf(FilenameUtils.getExtension(decompressedFilename).toUpperCase()); } catch (IllegalArgumentException e) { LOG.debug("Not a recognised Archive type"); return null; } } CompressedFile(File compressedFile); }
CompressedFile { DownloadableFileType getArchiveType() { try { return DownloadableFileType.valueOf(FilenameUtils.getExtension(decompressedFilename).toUpperCase()); } catch (IllegalArgumentException e) { LOG.debug("Not a recognised Archive type"); return null; } } CompressedFile(File compressedFile);  }
CompressedFile { DownloadableFileType getArchiveType() { try { return DownloadableFileType.valueOf(FilenameUtils.getExtension(decompressedFilename).toUpperCase()); } catch (IllegalArgumentException e) { LOG.debug("Not a recognised Archive type"); return null; } } CompressedFile(File compressedFile);   }