mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-08-18 20:38:02 +08:00
新增读取流无法识别类型按照扩展名识别
This commit is contained in:
@@ -6,6 +6,7 @@ import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
@@ -56,4 +57,13 @@ public class FileTypeUtilTest {
|
||||
Assert.assertEquals("ofd", type);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void inputStreamAndFilenameTest() {
|
||||
File file = FileUtil.file("e:/laboratory/test.xlsx");
|
||||
String type = FileTypeUtil.getType(file);
|
||||
Assert.assertEquals("xlsx", type);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user