Java examples for Network:Mime Type
Indicates whether a mime-type represents an document containing html or xhtml.
//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; } }