MediaTypeDetectorDetect Method (Stream, LoadOptions)
Detects the media type by the content of the stream.

Namespace: GroupDocs.Parser.Detectors.MediaType
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 19.5
Syntax
public virtual string Detect(
	Stream stream,
	LoadOptions loadOptions
)

Parameters

stream
Type: System.IOStream
Stream of the document.
loadOptions
Type: GroupDocs.ParserLoadOptions
The options of loading the file.

Return Value

Type: String
A string with the media type if the media type is detected; otherwise, null.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
See Also