@NonNull
    public static String replaceNonFilenameChars(@Nullable final String text) {
        if (StringUtils.isBlank(text)) {
            return "-";
        }
        return text.trim().replaceAll("[^a-zA-Z0-9_-]", "_");
    }
Returns the available space in bytes on the mount point used by the given dir.
main/src/main/java/cgeo/geocaching/utils/FileUtils.java