Package org.apache.nutch.util.mime

Examples of org.apache.nutch.util.mime.MimeTypes


    // set headers
    headers.set(Response.CONTENT_LENGTH, new Long(size).toString());
    headers.set(Response.LAST_MODIFIED, this.file.httpDateFormat.toString(f
        .lastModified()));
    MimeTypes mimeTypes = MimeTypes.get(conf.get("mime.types.file"));
    MimeType mimeType = mimeTypes.getMimeType(f);
    String mimeTypeString = mimeType != null ? mimeType.getName() : "";
    headers.set(Response.CONTENT_TYPE, mimeTypeString);

    // response code
    this.code = 200; // http OK
View Full Code Here

TOP

Related Classes of org.apache.nutch.util.mime.MimeTypes

Copyright © 2018 www.massapicom. 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.