# MimeTypeDetector (Crawler-commons 1.4 API)

Package crawlercommons.mimetypes

## Class MimeTypeDetector

- java.lang.Object
- - crawlercommons.mimetypes.MimeTypeDetector

    public class MimeTypeDetector
    extends Object

### Constructor Summary

Constructors
`MimeTypeDetector()`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `detect​(byte[] content)`
`String` `detect​(byte[] content, int length)`
`String` `detect​(InputStream is)`
`boolean` `isGzip​(String mimeType)`
`boolean` `isText​(String mimeType)`
`boolean` `isXml​(String mimeType)`
`String` `normalize​(String contentType, byte[] content)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MimeTypeDetector

    public MimeTypeDetector()

### Method Detail

#### detect

    public String detect​(byte[] content)

#### detect

    public String detect​(byte[] content,
                         int length)

#### detect

    public String detect​(InputStream is)
                  throws IOException

Throws:
  `IOException`

#### isXml

    public boolean isXml​(String mimeType)

#### isText

    public boolean isText​(String mimeType)

#### isGzip

    public boolean isGzip​(String mimeType)

#### normalize

    public String normalize​(String contentType,
                            byte[] content)