This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 31509 - Request helper methods to find less specific MIME types
Summary: Request helper methods to find less specific MIME types
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@platform
URL:
Keywords: API
Depends on:
Blocks: 16389 31223
  Show dependency tree
 
Reported: 2003-02-26 17:13 UTC by Jesse Glick
Modified: 2008-12-22 16:08 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-02-26 17:13:12 UTC
Suggest:

/**
 * Find progressively less specific MIME type
variants.
 * Given a MIME type such as
"text/ant+xml;charset=UTF-8" it might
 * produce:
 * <ul>
 * <li><code>text/ant+xml;charset=UTF-8</code></li>
 * <li><code>text/ant+xml</code></li>
 * <li><code>text/xml</code></li>
 * <li><code>text/*</code></li>
 * <li><code>content/unknown</code></li>
 * </ul>
 * May be useful e.g. for finding suitable editor
kits for a file.
 * @param a fully-specified MIME type
 * @return a read-only iterator of MIME type
strings based on that,
 *         from most to least specific
 */
public static Iterator
Utilities.mimeTypeDefaults(String mt);

/**
 * Find progressively less specific MIME type variants
 * as folder-like names suitable for JNDI lookup.
 * Given a MIME type such as
"text/ant+xml;charset=UTF-8" it might
 * produce:
 * <ul>
 * <li><code>text/xml/ant/</code></li>
 * <li><code>text/xml/</code></li>
 * <li><code>text/</code></li>
 * <li>(the empty string)</li>
 * </ul>
 * May be useful e.g. for finding some settings
for a file
 * based on its MIME type, with the possibility to
use defaults.
 * @param a fully-specified MIME type
 * @return a read-only iterator of contexts based
on that,
 *         from most to least specific
 */
public static Iterator
Utilities.mimeTypeContexts(String mt);
Comment 1 Jesse Glick 2006-07-20 05:35:38 UTC
Handled by MIME Lookup API.