Examples of guessMIMEType()


Examples of org.apache.any23.mime.MIMETypeDetector.guessMIMEType()

            throw new IllegalArgumentException("No input document URL specified");
        }

        final DocumentSource documentSource = document.get(0);
        final MIMETypeDetector detector = new TikaMIMETypeDetector();
        final MIMEType mimeType = detector.guessMIMEType(
                documentSource.getDocumentURI(),
                documentSource.openInputStream(),
                MIMEType.parse(documentSource.getContentType())
        );
        System.out.println(mimeType);

Examples of org.apache.any23.mime.TikaMIMETypeDetector.guessMIMEType()

            throw new IllegalArgumentException("No input document URL specified");
        }

        final DocumentSource documentSource = document.get(0);
        final MIMETypeDetector detector = new TikaMIMETypeDetector();
        final MIMEType mimeType = detector.guessMIMEType(
                documentSource.getDocumentURI(),
                documentSource.openInputStream(),
                MIMEType.parse(documentSource.getContentType())
        );
        System.out.println(mimeType);
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.