manailin
2021-10-29 b1a56e91d007666b0867b933f211da2b8a10c78a
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/FileType.java
@@ -5,7 +5,7 @@
import lombok.extern.slf4j.Slf4j;
/**
 * 应用模块名称
 * FileType 应用模块名称
 * <p>
 * 代码描述 文件类型判断工具类
 * <p>
@@ -19,9 +19,10 @@
 */
@Slf4j
public class FileType {
    public static final String NOT_IMAGE_FILE_TYPE = "0000";
    public static String bytesToHexString(byte[] src) {
    private static final String NOT_IMAGE_FILE_TYPE = "0000";
    private static String bytesToHexString(byte[] src) {
        StringBuilder stringBuilder = new StringBuilder();
        if (src == null || src.length <= 0) {
            return null;
@@ -77,14 +78,14 @@
     * 
     * @param args
     */
    // public static void main(String[] args) throws Exception {
    // FileInputStream is = new FileInputStream("D:\\Pictures\\11.png");
    // byte[] b = new byte[3];
    // is.read(b, 0, b.length);
    // String photo = bytesToHexString(b);
    // photo = photo.toUpperCase();
    // System.out.println("头文件是:" + photo);
    // String ooo = TypeDict.checkType(photo);
    // System.out.println("后缀名是:" + ooo);
    // }
//     public static void main(String[] args) throws Exception {
//     FileInputStream is = new FileInputStream("D:\\Pictures\\3.mp4");
//     byte[] b = new byte[3];
//     is.read(b, 0, b.length);
//     String photo = bytesToHexString(b);
//     photo = photo.toUpperCase();
//     System.out.println("头文件是:" + photo);
//    String ooo = TypeDict.checkFileType(photo);
//     System.out.println("后缀名是:" + ooo);
//     }
}