congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MimeUtils.getContentTypesPropertiesStream
Code IndexAdd Tabnine to your IDE (free)

How to use
getContentTypesPropertiesStream
method
in
libcore.net.MimeUtils

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

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.netMimeUtilsgetContentTypesPropertiesStream

Popular methods of MimeUtils

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • ImageIO (javax.imageio)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now