Codota Logo
MimeUtils.add
Code IndexAdd Codota to your IDE (free)

How to use
add
method
in
libcore.net.MimeUtils

Best Java code snippets using libcore.net.MimeUtils.add (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: robovm/robovm

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: ibinti/bugvm

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: MobiVM/robovm

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: com.gluonhq/robovm-rt

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: com.bugvm/bugvm-rt

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
origin: FlexoVM/flexovm

/**
 * This isn't what the RI does. The RI doesn't have hard-coded defaults, so supplying your
 * own "content.types.user.table" means you don't get any of the built-ins, and the built-ins
 * come from "$JAVA_HOME/lib/content-types.properties".
 */
private static void applyOverrides() {
  // Get the appropriate InputStream to read overrides from, if any.
  InputStream stream = getContentTypesPropertiesStream();
  if (stream == null) {
    return;
  }
  try {
    try {
      // Read the properties file...
      Properties overrides = new Properties();
      overrides.load(stream);
      // And translate its mapping to ours...
      for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
        String extension = (String) entry.getKey();
        String mimeType = (String) entry.getValue();
        add(mimeType, extension);
      }
    } finally {
      stream.close();
    }
  } catch (IOException ignored) {
  }
}
libcore.netMimeUtilsadd

Popular methods of MimeUtils

  • getContentTypesPropertiesStream
  • guessMimeTypeFromExtension
    Returns the MIME type for the given extension.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • JLabel (javax.swing)
  • JList (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now