List of usage examples for org.apache.commons.vfs2 FileContentInfoFactory create
FileContentInfo create(FileContent fileContent) throws FileSystemException;
From source file:org.mycore.common.content.MCRVFSContent.java
@Override public String getMimeType() throws IOException { if (super.getMimeType() != null) { return super.getMimeType(); }//from w w w .j av a2 s .c o m FileContentInfoFactory fileContentInfoFactory = fo.getFileSystem().getFileSystemManager() .getFileContentInfoFactory(); FileContent content = fo.getContent(); try { return fileContentInfoFactory.create(content).getContentType(); } finally { content.close(); } }