Implemented by
- @mozilla.org/streamconv;1?from=application/x-vnd.mozilla.maybe-text&to=*/*
- @mozilla.org/browser/feeds/sniffer;1
- @mozilla.org/streamconv;1?from=application/x-unknown-content-type&to=*/*
- @mozilla.org/network/content-sniffer;1
Content sniffer interface. Components implementing this interface can determine a MIME type from a chunk of bytes. NOTE: This interface is equivalent to nsIContentSniffer, but its method has an additional paramter. It exists only on the 1.8 branch of Mozilla; use nsIContentSniffer on newer branches. @status TEMPORARY
[scriptable, uuid(a5772d1b-fc63-495e-a169-96e8d3311af0)]
interface nsIContentSniffer_MOZILLA_1_8_BRANCH : nsISupports
Methods
Given a chunk of data, determines a MIME type. Information from the given request may be used in order to make a better decision. @param aRequest The request where this data came from. May be null. @param aData Data to check @param aLength Length of the data @return The content type @throw NS_ERROR_NOT_AVAILABLE if no MIME type could be determined. @note Implementations should consider the request read-only. Especially, they should not attempt to set the content type property that subclasses of nsIRequest might offer.
ACString
getMIMETypeFromContent(in nsIRequest aRequest, [const, array, size_is(aLength)] in octet aData, in unsigned long aLength)
Compare to: