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 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)
-
-
-
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)
-
-