Java tutorial
//package com.java2s; import android.text.TextUtils; public class Main { /** * Translates avatar id to string that can be used by disc cache as file name. * @param avatarId Avatar ID. * @return Key/file name for disk cache. */ public static String getDiskCacheKey(final String avatarId) { if (!TextUtils.isEmpty(avatarId)) { return avatarId.replace("|", "").toLowerCase(); } return null; } }