Java Code Examples for

The following examples show how to use . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File:    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
 * Builds name by appending copy label.
String buildNewName(final String name)
    String baseName = FilenameUtils.getBaseName(name);
    String extension = FilenameUtils.getExtension(name);

    String newName = I18NUtil.getMessage(COPY_OF_LABEL, baseName);

    // append extension, if any, to filename
    if (extension != null && !extension.isEmpty())
        newName = newName + FilenameUtils.EXTENSION_SEPARATOR_STR + extension;

    return newName;
Example 2
Source File:    From multiapps-controller with Apache License 2.0 4 votes vote down vote up
private String getFileExtension() {
    return FilenameUtils.EXTENSION_SEPARATOR_STR + "zip";