mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix FileTypeUtil
This commit is contained in:
parent
530151fbfd
commit
3a22d7e0da
@ -60,7 +60,7 @@ public class FileTypeUtil {
|
|||||||
FILE_TYPE_MAP.put("4d546864000000060001", "mid"); // MIDI (mid)
|
FILE_TYPE_MAP.put("4d546864000000060001", "mid"); // MIDI (mid)
|
||||||
FILE_TYPE_MAP.put("526172211a0700cf9073", "rar"); // WinRAR
|
FILE_TYPE_MAP.put("526172211a0700cf9073", "rar"); // WinRAR
|
||||||
FILE_TYPE_MAP.put("235468697320636f6e66", "ini");
|
FILE_TYPE_MAP.put("235468697320636f6e66", "ini");
|
||||||
FILE_TYPE_MAP.put("504B0304140000000800", "odf"); // ofd文件 国标版式文件
|
FILE_TYPE_MAP.put("504B0304140000000800", "ofd"); // ofd文件 国标版式文件
|
||||||
FILE_TYPE_MAP.put("504B03040a0000000000", "jar");
|
FILE_TYPE_MAP.put("504B03040a0000000000", "jar");
|
||||||
FILE_TYPE_MAP.put("504B0304140008000800", "jar");
|
FILE_TYPE_MAP.put("504B0304140008000800", "jar");
|
||||||
// MS Excel 注意:word、msi 和 excel的文件头一样
|
// MS Excel 注意:word、msi 和 excel的文件头一样
|
||||||
|
@ -53,7 +53,7 @@ public class FileTypeUtilTest {
|
|||||||
Console.log(hex);
|
Console.log(hex);
|
||||||
String type = FileTypeUtil.getType(file);
|
String type = FileTypeUtil.getType(file);
|
||||||
Console.log(type);
|
Console.log(type);
|
||||||
Assert.assertEquals("odf", type);
|
Assert.assertEquals("ofd", type);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user