Indicates whether a mime-type represents an document containing html or xhtml. - Java Network

Java examples for Network:Mime Type

Description

Indicates whether a mime-type represents an document containing html or xhtml.

Demo Code


//package com.java2s;

public class Main {
    /**//from  ww  w  .  ja v  a2s.  co m
     * Indicates whether a mime-type represents an document containing html
     * or xhtml.
     * @param mimeType
     * @return true if mime-type represents a html document.
     */
    public static boolean isHTML(String mimeType) {
        if (mimeType.equals("text/html")
                || mimeType.equals("application/xhtml+xml")) {
            return true;
        }
        return false;
    }
}

Related Tutorials