Package crawlercommons.mimetypes
Class MimeTypeDetector
- java.lang.Object
-
- crawlercommons.mimetypes.MimeTypeDetector
-
public class MimeTypeDetector extends Object
-
-
Constructor Summary
Constructors Constructor Description MimeTypeDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdetect(byte[] content)Stringdetect(byte[] content, int length)Stringdetect(InputStream is)booleanisGzip(String mimeType)booleanisText(String mimeType)booleanisXml(String mimeType)Stringnormalize(String contentType, byte[] content)
-
-
-
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)
-
-