Package com.google.common.base

Examples of com.google.common.base.CharMatcher.trimAndCollapseFrom()


     * @return
     */
    private static String formatDirName(final String prefix, final String suffix) {
        // Replace all invalid characters with '-'
        final CharMatcher invalidCharacters = VALID_SUFFIX_CHARS.negate();
        return String.format("%s-%s", prefix, invalidCharacters.trimAndCollapseFrom(suffix.toLowerCase(), '-'));
    }

    private static boolean deleteUserDirectoryQuietly(final String user, final File directory) {
        LOGGER.info("Deleting user directory " + directory + " for user: " + user);
        final boolean success = FileUtils.deleteQuietly(directory);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.