C# Класс Tp.Utils.Mime.MimeTypes

Summary description for MimeTypes.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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).

Описание методов

ForName() публичный Метод

Return a MimeType from its name.
public ForName ( String name ) : MimeType
name String
Результат MimeType

Get() публичный статический Метод

Return a MimeTypes instance.
public static Get ( string filepath ) : MimeTypes
filepath string is the mime-types definitions xml file. ///
Результат MimeTypes

GetMimeType() публичный Метод

Find the Mime Content Type of a document from its URL.
public GetMimeType ( Uri url ) : MimeType
url System.Uri of the document to analyze. ///
Результат MimeType

GetMimeType() публичный Метод

Find the Mime Content Type of a document from its name.
public GetMimeType ( string name ) : MimeType
name string of the document to analyze. ///
Результат MimeType

GetMimeTypeByContent() публичный Метод

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. /// ///
Результат MimeType

GetMimeTypeByExtension() публичный Метод

public GetMimeTypeByExtension ( string name ) : MimeType
name string
Результат MimeType

MimeTypes() публичный Метод

public MimeTypes ( ) : System
Результат System

MimeTypes() публичный Метод

Should never be instanciated from outside
public MimeTypes ( string strFilepath ) : System
strFilepath string
Результат System