org.apache.tika
tika-core
1.18
Next, we’ll make use of the detect() method to resolve the type:
@Test
public void whenUsingTika_thenSuccess() {
File file = new File(“product.png”);
Tika tika = new Tika();
String mimeType = tika.detect(file);
assertEquals(mimeType, “image/png”);
}
6379

被折叠的 条评论
为什么被折叠?



