cgm 转jpg java_获取图片,音频,视频,压缩包文件类型的工具类

1.[代码][Java]代码

/*

* Copyright (C) 2013 Simple Explorer

*

* This program is free software; you can redistribute it and/or

* modify it under the terms of the GNU General Public License

* as published by the Free Software Foundation; either version 2

* of the License, or (at your option) any later version.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with this program; if not, write to the Free Software

* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,

* MA 02110-1301, USA.

*/

package com.dnielfe.manager.preview;

import android.webkit.MimeTypeMap;

import com.dnielfe.manager.R;

import com.dnielfe.manager.utils.SimpleUtils;

import java.io.File;

import java.util.HashMap;

import java.util.Locale;

import java.util.regex.Pattern;

public final class MimeTypes {

public static final String ALL_MIME_TYPES = "*/*";

private static final HashMap EXT_ICONS = new HashMap<>();

private static final HashMap MIME_TYPES = new HashMap<>();

static {

// BINARY

EXT_ICONS.put("a", R.drawable.type_unknown);

EXT_ICONS.put("bin", R.drawable.type_unknown);

EXT_ICONS.put("class", R.drawable.type_unknown);

EXT_ICONS.put("com", R.drawable.type_unknown);

EXT_ICONS.put("dex", R.drawable.type_unknown);

EXT_ICONS.put("dump", R.drawable.type_unknown);

EXT_ICONS.put("exe", R.drawable.type_unknown);

EXT_ICONS.put("dat", R.drawable.type_unknown);

EXT_ICONS.put("dll", R.drawable.type_unknown);

EXT_ICONS.put("lib", R.drawable.type_unknown);

EXT_ICONS.put("o", R.drawable.type_unknown);

EXT_ICONS.put("obj", R.drawable.type_unknown);

EXT_ICONS.put("pyc", R.drawable.type_unknown);

EXT_ICONS.put("pyo", R.drawable.type_unknown);

EXT_ICONS.put("ser", R.drawable.type_unknown);

EXT_ICONS.put("swf", R.drawable.type_unknown);

EXT_ICONS.put("so", R.drawable.type_unknown);

// Shell

EXT_ICONS.put("bar", R.drawable.type_unknown);

EXT_ICONS.put("csh", R.drawable.type_unknown);

EXT_ICONS.put("ksh", R.drawable.type_unknown);

EXT_ICONS.put("sh", R.drawable.type_unknown);

// TEXT

EXT_ICONS.put("csv", R.drawable.type_note);

EXT_ICONS.put("diff", R.drawable.type_note);

EXT_ICONS.put("in", R.drawable.type_note);

EXT_ICONS.put("list", R.drawable.type_note);

EXT_ICONS.put("log", R.drawable.type_note);

EXT_ICONS.put("rc", R.drawable.type_note);

EXT_ICONS.put("text", R.drawable.type_note);

EXT_ICONS.put("txt", R.drawable.type_note);

EXT_ICONS.put("tsv", R.drawable.type_note);

// Properties

EXT_ICONS.put("properties", R.drawable.type_config);

EXT_ICONS.put("conf", R.drawable.type_config);

EXT_ICONS.put("config", R.drawable.t

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值