Android File Extension Name Add addExtension(String name, String type)

Here you can find the source of addExtension(String name, String type)

Description

add Extension

Declaration

public static String addExtension(String name, String type) 

Method Source Code

//package com.java2s;

public class Main {
    public static String addExtension(String name, String type) {
        return name + createExtension(type);
    }/*from  ww w.  j  a  va  2s .c  o m*/

    /**
     * Creates an extension string for the given type that can be concatenated
     * to a base filename or for filtering files with the given type.
     * @param type
     * @return 
     */
    public static String createExtension(String type) {
        return "." + type;
    }
}