Java tutorial
//package com.java2s; /** * Appcelerator Titanium Mobile * Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ public class Main { public static boolean isBinaryMimeType(String mimeType) { if (mimeType != null) { if (mimeType.startsWith("application/") && !mimeType.startsWith("application/xml")) { return true; } else if (mimeType.startsWith("image/") && !mimeType.startsWith("image/svg+xml")) { return true; } else if (mimeType.startsWith("audio/") || mimeType.startsWith("video/")) { return true; } else return false; } return false; } }