C# Class Tp.Utils.Mime.MimeTypes

Summary description for MimeTypes.
Afficher le fichier Open project: TargetProcess/Target-Process-Plugins Class Usage Examples

Méthodes publiques

Méthode Description
ForName ( String name ) : MimeType

Return a MimeType from its name.

Get ( string filepath ) : MimeTypes

Return a MimeTypes instance.

GetMimeType ( Uri url ) : MimeType

Find the Mime Content Type of a document from its URL.

GetMimeType ( string name ) : MimeType

Find the Mime Content Type of a document from its name.

GetMimeTypeByContent ( Stream data ) : MimeType

Find the Mime Content Type of a stream from its content.

GetMimeTypeByExtension ( string name ) : MimeType
MimeTypes ( ) : System
MimeTypes ( string strFilepath ) : System

Should never be instanciated from outside

Private Methods

Méthode Description
Add ( MimeType types ) : void

Add the specified mime-types in the repository.

GetMimeTypes ( string name ) : Tp.Utils.Mime.MimeType[]

Returns an array of matching MimeTypes from the specified name (many MimeTypes can have the same registered extensions).

Method Details

ForName() public méthode

Return a MimeType from its name.
public ForName ( String name ) : MimeType
name String
Résultat MimeType

Get() public static méthode

Return a MimeTypes instance.
public static Get ( string filepath ) : MimeTypes
filepath string is the mime-types definitions xml file. ///
Résultat MimeTypes

GetMimeType() public méthode

Find the Mime Content Type of a document from its URL.
public GetMimeType ( Uri url ) : MimeType
url System.Uri of the document to analyze. ///
Résultat MimeType

GetMimeType() public méthode

Find the Mime Content Type of a document from its name.
public GetMimeType ( string name ) : MimeType
name string of the document to analyze. ///
Résultat MimeType

GetMimeTypeByContent() public méthode

Find the Mime Content Type of a stream from its content.
public GetMimeTypeByContent ( Stream data ) : MimeType
data Stream are the first bytes of data of the content to analyze. /// Depending on the length of provided data, all known MimeTypes are /// checked. If the length of provided data is greater or egals to /// the value returned by {@link #getMinLength()}, then all known /// MimeTypes are checked, otherwise only the MimeTypes that could be /// analyzed with the length of provided data are analyzed. /// ///
Résultat MimeType

GetMimeTypeByExtension() public méthode

public GetMimeTypeByExtension ( string name ) : MimeType
name string
Résultat MimeType

MimeTypes() public méthode

public MimeTypes ( ) : System
Résultat System

MimeTypes() public méthode

Should never be instanciated from outside
public MimeTypes ( string strFilepath ) : System
strFilepath string
Résultat System