WordsMediaTypeDetector Class
Provides the functionality to detect the media type a text document.
Inheritance Hierarchy
SystemObject
  GroupDocs.Parser.Detectors.MediaTypeMediaTypeDetector
    GroupDocs.Parser.Detectors.MediaTypeWordsMediaTypeDetector

Namespace: GroupDocs.Parser.Detectors.MediaType
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 19.5
Syntax
public sealed class WordsMediaTypeDetector : MediaTypeDetector

The WordsMediaTypeDetector type exposes the following members.

Constructors
  NameDescription
Public methodWordsMediaTypeDetector
Initializes a new instance of the WordsMediaTypeDetector class.
Methods
  NameDescription
Public methodDetect(Stream)
Detects the media type by the content of the stream.
(Inherited from MediaTypeDetector.)
Public methodDetect(String)
Detects the media type by the fileName.
(Inherited from MediaTypeDetector.)
Public methodDetect(Stream, LoadOptions)
Detects the media type by the content of the stream.
(Inherited from MediaTypeDetector.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Public methodSupports
Detects whether the mediaType is supported by the detector.
(Inherited from MediaTypeDetector.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Remarks

Supported formats:

.DOCMicrosoft Word Text document
.DOTMicrosoft Word Text template
.DOCXMicrosoft Office Open XML Text document
.DOCMMicrosoft Word 2007 Master document
.RTFRich Text Format text file
.ODTOpenDocument text
.TXTPlain text
.HTML (.XHTML, .HTM)Hypertext Markup Language document
.MHTML (.MHT)Web Archive Single File
Examples

Detecting the media type of a text document:

C#
// Create a media type detector of a text document
var detector = new WordsMediaTypeDetector();
// Detect a media type
var mediaType = detector.Detect(stream);
See Also