Package org.semanticdesktop.aperture.mime.identifier

Examples of org.semanticdesktop.aperture.mime.identifier.MimeTypeIdentifier.identify()


        MimeTypeIdentifier identifier = new MagicMimeTypeIdentifier();
        // Read as many bytes of the file as desired by the MIME-type identifier
        int minimumArrayLength = identifier.getMinArrayLength();
        byte[] bytes = IOUtil.readBytes(content, minimumArrayLength);
        // let the MimeTypeIdentifier determine the MIME-type of this file
        return identifier.identify(bytes, name, null);
    }
}
View Full Code Here

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.