@Test public void testGetFileExtension_1() throws Exception { String fileName = ".zip"; String result = FileNameUtils.getFileExtension(fileName); assertEquals(".zip", result); }
public static String getFileExtension(String fileName) { if (fileName != null) { if (fileName.endsWith(ZIP)) { return ZIP; } if (fileName.endsWith(TAR_GZ)) { return TAR_GZ; } if (fileName.endsWith(TGZ)) { return TGZ; } } return "unsupported"; }
FileNameUtils { public static String getFileExtension(String fileName) { if (fileName != null) { if (fileName.endsWith(ZIP)) { return ZIP; } if (fileName.endsWith(TAR_GZ)) { return TAR_GZ; } if (fileName.endsWith(TGZ)) { return TGZ; } } return "unsupported"; } }
FileNameUtils { public static String getFileExtension(String fileName) { if (fileName != null) { if (fileName.endsWith(ZIP)) { return ZIP; } if (fileName.endsWith(TAR_GZ)) { return TAR_GZ; } if (fileName.endsWith(TGZ)) { return TGZ; } } return "unsupported"; }  }
FileNameUtils { public static String getFileExtension(String fileName) { if (fileName != null) { if (fileName.endsWith(ZIP)) { return ZIP; } if (fileName.endsWith(TAR_GZ)) { return TAR_GZ; } if (fileName.endsWith(TGZ)) { return TGZ; } } return "unsupported"; }  static String getFileExtension(String fileName); static boolean isTarGz(String componentExtension); static boolean isZip(String componentExtension); static boolean isUnsupported(String componentExtension); static String convertToValidPath(String path); static String getName(String filename); static int indexOfLastSeparator(String filename); static String getDependencyFileName(String osName,
			String componentName); static String getInstallerFilePath(String osName,
			String componentName); static String getSciprtPath(String technology, String fileName); static String getParentFolderName(String folderPath); static ONSFileType getFileType(String fileName); static String getPathFromArchive(String archiveFile,
			String charSequence); static String getExtractedDirectoryName(String archiveFile); static String getComponentEnvFilePath(String componentName); }
FileNameUtils { public static String getFileExtension(String fileName) { if (fileName != null) { if (fileName.endsWith(ZIP)) { return ZIP; } if (fileName.endsWith(TAR_GZ)) { return TAR_GZ; } if (fileName.endsWith(TGZ)) { return TGZ; } } return "unsupported"; }  static String getFileExtension(String fileName); static boolean isTarGz(String componentExtension); static boolean isZip(String componentExtension); static boolean isUnsupported(String componentExtension); static String convertToValidPath(String path); static String getName(String filename); static int indexOfLastSeparator(String filename); static String getDependencyFileName(String osName,
			String componentName); static String getInstallerFilePath(String osName,
			String componentName); static String getSciprtPath(String technology, String fileName); static String getParentFolderName(String folderPath); static ONSFileType getFileType(String fileName); static String getPathFromArchive(String archiveFile,
			String charSequence); static String getExtractedDirectoryName(String archiveFile); static String getComponentEnvFilePath(String componentName);  }